Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli support for delete and restore + docs #367

Merged
merged 6 commits into from Aug 27, 2018
Merged

Conversation

mparkhe
Copy link
Contributor

@mparkhe mparkhe commented Aug 24, 2018

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #367 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
- Coverage   27.81%   27.76%   -0.05%     
==========================================
  Files         114      114              
  Lines        5836     5846      +10     
==========================================
  Hits         1623     1623              
- Misses       4213     4223      +10
Impacted Files Coverage Δ
mlflow/experiments.py 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fd858b...6e61eae. Read the comment docs.



Create
------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be a separate kind of header from ---- to render correctly in the docs, since it's under Experiments. Right now these will look like the same level of heading. You can look at the Sphinx/RST docs to see the hierarchy of headings allowed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might also be possible to just make this a bulleted list instead of sections, since there's a lot of detail about each one.

Copy link
Contributor Author

@mparkhe mparkhe Aug 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I misread the documentations. Subsections are marked with "~" . Patching coming soon.

I had initially tried the bullet route, but it looked a bit bulky.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed:

image

Delete an active experiment. Command takes an mandatory argument experiment ID. If experiment
is already deleted or not found, the command will throw error. This deletes associated metadata,
runs and data as well. If the backend store controls locations of artifacts, they will be deleted
as well. Deleted experiments can be restored using ``restore`` command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe talk about how they can clear the trash here? Can also recommend setting up a cron job or something.

def delete_experiment(experiment_id):
"""
Delete an experiment from backend store.
Will error out if experiment does not exist or already deleted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This help should say that you mark it for deletion. Experiments marked this way can be restored with restore, or cleared based on the backend store (refer to docs for that).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"""
store = _get_store()
store.restore_experiment(experiment_id)
print("Experiment with id %s has been restored and is now active." % str(experiment_id))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the "is now active".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -38,7 +38,31 @@ def list_experiments():
List all experiments in the configured tracking server.
"""
store = _get_store()
experiments = store.list_experiments()
experiments = store.list_experiments("deleted_only")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToDo : fix this. Should default to active_only

@codecov-io
Copy link

codecov-io commented Aug 27, 2018

Codecov Report

Merging #367 into master will decrease coverage by 0.04%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
- Coverage   27.98%   27.94%   -0.05%     
==========================================
  Files         115      115              
  Lines        5925     5948      +23     
==========================================
+ Hits         1658     1662       +4     
- Misses       4267     4286      +19
Impacted Files Coverage Δ
mlflow/experiments.py 0% <0%> (ø) ⬆️
mlflow/entities/view_type.py 50% <40%> (-50%) ⬇️
mlflow/projects/databricks.py 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc438e4...4c51742. Read the comment docs.

def list_experiments():
@click.option("--view", "-v", default="active_only",
help="Select view type for list experiments. Valid view types are "
"'active_only' (default), 'delete_only', and 'all'.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: delete_only should say deleted_only

@mateiz
Copy link
Contributor

mateiz commented Aug 27, 2018

LGTM except for a small typo.

@mparkhe mparkhe merged commit 86336cb into mlflow:master Aug 27, 2018
@mparkhe mparkhe deleted the cli branch August 27, 2018 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants