Skip to content

Commit

Permalink
[java] Set user tag and mark userId field as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
acroz committed May 9, 2019
1 parent 811c7f7 commit e61a7a1
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -86,7 +86,12 @@ public RunInfo createRun(String experimentId) {
request.setStartTime(System.currentTimeMillis());
String username = System.getProperty("user.name");
if (username != null) {
request.setUserId(System.getProperty("user.name"));
RunTag.Builder tag = RunTag.newBuilder();
tag.setKey("mlflow.user");
tag.setValue(username);
request.addTags(tag.build());
// userId is deprecated and will be removed in a future MLflow release
request.setUserId(username);
}
return createRun(request.build());
}
Expand Down Expand Up @@ -432,7 +437,6 @@ public void logArtifacts(String runId, File localDir) {
getArtifactRepository(runId).logArtifacts(localDir);
}


/**
* Uploads all files within the given local director an artifactPath within the run's root
* artifact directory. For example, if /my/local/dir/ contains two files "file1" and "file2", then
Expand Down

0 comments on commit e61a7a1

Please sign in to comment.