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

MLFLOW_EXPERIMENT_NAME env variable and --experiment-name arguments for CLI command #889

Merged
merged 5 commits into from
Feb 14, 2019

Conversation

mparkhe
Copy link
Collaborator

@mparkhe mparkhe commented Feb 12, 2019

  • MLFLOW_EXPERIMENT_NAME env variable and --experiment-name arguments for CLI command
  • get_experiment_by_name method for SQL store
  • tests for env variables (MLFLOW_EXPERIMENT_NAME and MLFLOW_EXPERIMENT_ID)
  • unit test for mlflow run CLI command (tested only new options)

… for CLI command

- get_experiment_by_name() for SQL store
- tests for env variables (MLFLOW_EXPERIMENT_NAME and MLFLOW_EXPERIMENT_ID)
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

A few small comments regarding get_experiment_by_name

mlflow/cli.py Outdated Show resolved Hide resolved
mlflow/store/abstract_store.py Show resolved Hide resolved
@@ -50,6 +50,16 @@ def get_experiment(self, experiment_id):
"""
pass

@abstractmethod
def get_experiment_by_name(self, experiment_name):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like all three implementations of this method invoke list_experiments() and match against the provided experiment name. That seems to suggest that we can provide an implementation of the method in the base class. If this implementation is not performant enough for a given use case, the implementor can always override the method.

I noticed that the file_store implementation makes an additional call to _check_root_dir prior to calling list_experiments. However, list_experiments immediately calls _check_root_dir, so this call seems to be superfluous: all three implementations seem to share the same structure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Like your idea of base implementation or adding specific implementations for each.

Will take care of this in a follow on change since this is a PR for --experiment-name change (which needed this get_experiment_by_name method for completeness)

mlflow/cli.py Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewmchen andrewmchen left a comment

Choose a reason for hiding this comment

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

PR looks pretty good. Just some minor comments.

mlflow/store/abstract_store.py Outdated Show resolved Hide resolved
Throws an exception if experiment is not found or permanently deleted.

:param experiment_name: Name of experiment
:return: A single Experiment object if it exists, otherwise raises an Exception.
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra credit: is it possible to put some sphinx markup here so it links to the docs for the Experiment object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure. Lemme explore that asynchronously...

Copy link
Collaborator

@dbczumar dbczumar Feb 13, 2019

Choose a reason for hiding this comment

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

Yes! :ref:Experiment <fully_qualified_module_name_here>.

tests/tracking/test_fluent.py Show resolved Hide resolved
Copy link
Collaborator

@dbczumar dbczumar left a comment

Choose a reason for hiding this comment

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

LGTM

@mparkhe mparkhe merged commit 20403fe into mlflow:master Feb 14, 2019
mparkhe added a commit to mparkhe/mlflow that referenced this pull request Feb 14, 2019
… has a specialized implementation.

- Added sphinx markup for AbstractStore for pydocs

ref: addressing comments in PR mlflow#889
mparkhe added a commit that referenced this pull request Feb 14, 2019
* Basic implementation of "get_experiment_by_name" to base class, SQL has a specialized implementation.
* Added sphinx markup for AbstractStore for pydocs

ref: addressing comments in PR #889
@mparkhe mparkhe deleted the by_name branch July 2, 2019 16:44
@mparkhe mparkhe restored the by_name branch July 2, 2019 16:44
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.

3 participants