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
Move user to tag #1230
Move user to tag #1230
Conversation
This reverts commit e61a7a1. In the end, it's probably best just not to set any tags - this is the client, not a fluent layer.
This will provide username support on Windows as well as UNIX
mlflow/protos/service.proto
Outdated
@@ -454,6 +454,8 @@ message RunInfo { | |||
optional string experiment_id = 2; | |||
|
|||
// User who initiated the run. | |||
// This field is deprecated, and will be removed in a future MLflow release. |
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.
Maybe include a since/as of MLflow 1.0 in this comment
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.
Done.
I think we may want to go ahead and make sqlalchemy_store and file_store auto-upgrade the user attribute into a tag, so that any runs created in MLflow 1.0 will not require migration once we drop the attribute. This is similar what we did for RUN_NAME here: https://github.com/mlflow/mlflow/pull/1188/files#diff-73334c51ec814d7e8b40d09d7d828f82L365 |
mlflow/protos/service.proto
Outdated
@@ -581,6 +583,8 @@ message CreateRun { | |||
optional string experiment_id = 1; | |||
|
|||
// ID of the user executing the run. | |||
// This field is deprecated, and will be removed in a future MLflow release. |
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.
jfyi - we are planning on adding a doc page specific to MLflow tags, as opposed to documenting within the REST API docs. I think someone may have accidentally deleted your previous docs, but those will be resurrected there.
Do you mean to set it for new runs or to migrate existing runs? In this PR, the user ID is being passed to the stores as both an attribute and a tag, so all runs created in MLflow 1.0 onwards would have both. |
Hmm, yeah, guess I was thinking for old clients, but you're right. Seems unnecessary. |
What changes are proposed in this pull request?
Following #1188 and further discussion with @aarondav, this PR migrates storage of the user who started a run to tags.
In particular:
mlflow.user
has been added and is set on creation of a run.I've also changed the logic for detecting system username from
pwd.getpwuid(os.getuid())[0]
to the standard library helpergetpass.getuser
, which should support Windows systems in most cases.How is this patch tested?
These changes affect a number of existing unit and integration tests, which have been updated to the change as appropriate.
Release Notes
mlflow.user
.Is this a user-facing change?
I've selected 'no' as the Python fluent interface and Java client interfaces are unchanged, and it seems likely as users would not often be using the
user_id
argument tomlflow_start_run
in the R client.What component(s) does this PR affect?
How should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes