Skip to content

Commit

Permalink
Add rename_experiment Tracking API, along with integration tests (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondav committed Oct 8, 2018
1 parent 06adfca commit eabce15
Show file tree
Hide file tree
Showing 16 changed files with 1,998 additions and 352 deletions.
3 changes: 3 additions & 0 deletions mlflow/entities/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def name(self):
"""String name of the experiment."""
return self._name

def _set_name(self, new_name):
self._name = new_name

@property
def artifact_location(self):
"""String corresponding to the root artifact URI for the experiment."""
Expand Down
13 changes: 13 additions & 0 deletions mlflow/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,16 @@ def restore_experiment(experiment_id):
store = _get_store()
store.restore_experiment(experiment_id)
print("Experiment with id %s has been restored." % str(experiment_id))


@commands.command("rename")
@click.argument("experiment_id")
@click.argument("new_name")
def rename_experiment(experiment_id, new_name):
"""
Renames an active experiment.
Returns an error if the experiment is inactive.
"""
store = _get_store()
store.rename_experiment(experiment_id, new_name)
print("Experiment with id %s has been renamed to '%s'." % (experiment_id, new_name))

0 comments on commit eabce15

Please sign in to comment.