-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Conversation
… for CLI command - get_experiment_by_name() for SQL store - tests for env variables (MLFLOW_EXPERIMENT_NAME and MLFLOW_EXPERIMENT_ID)
…ridden 'get_experiment_by_name' method )
There was a problem hiding this 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
@@ -50,6 +50,16 @@ def get_experiment(self, experiment_id): | |||
""" | |||
pass | |||
|
|||
@abstractmethod | |||
def get_experiment_by_name(self, experiment_name): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this 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.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… has a specialized implementation. - Added sphinx markup for AbstractStore for pydocs ref: addressing comments in PR mlflow#889
* 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
MLFLOW_EXPERIMENT_NAME
env variable and--experiment-name
arguments for CLI commandget_experiment_by_name
method for SQL storeMLFLOW_EXPERIMENT_NAME
andMLFLOW_EXPERIMENT_ID
)mlflow run
CLI command (tested only new options)