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
[BUG] stderr is duplicated in mlflow::mlflow_run() in R #2673
Comments
|
@javierluraschi @kevinykuo is this something you could help with? |
Note that the 2020/04/18 08:45:04 INFO mlflow.projects: === Created directory /var/folders/6g/bg5mcmsj7s51r33snbxhm1400000gn/T/tmpv_4jh3fs for
downloading remote URIs passed to arguments of type 'path' ===
2020/04/18 08:45:04 INFO mlflow.projects: === Created directory /var/folders/6g/bg5mcmsj7s51r33snbxhm1400000gn/T/tmpv_4jh3fs for
downloading remote URIs passed to arguments of type 'path' ===
2020/04/18 08:45:04 INFO mlflow.projects: === Running command 'source
/Users/lorenz/opt/miniconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow-da39a3ee5e6b4b0d3255bfef95601890afd80709
1>&2 && Rscript -e "mlflow::mlflow_source('R/script.R')" --args --large_dbl 4
--other 5 --lr 2' in run with ID '4fbdbce6dd8a4251a599465ce685df5b' ===
2020/04/18 08:45:04 INFO mlflow.projects: === Running command 'source
/Users/lorenz/opt/miniconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow
da39a3ee5e6b4b0d3255bfef95601890afd80709 1>&2 && Rscript -e
"mlflow::mlflow_source('R/script.R')" --args --large_dbl 4 --other 5 --lr 2' in run with ID
'4fbdbce6dd8a4251a599465ce685df5b' ===
2020/04/18 08:45:11 INFO mlflow.store.artifact.cli: Logged artifact from local file
/var/folders/6g/bg5mcmsj7s51r33snbxhm1400000gn/T//RtmpKNTLVG/file362556bc031b to
artifact_path=random
2020/04/18 08:45:11 INFO mlflow.store.artifact.cli: Logged artifact from local file
/var/folders/6g/bg5mcmsj7s51r33snbxhm1400000gn/T//RtmpKNTLVG/file362556bc031b to
artifact_path=random
2020/04/18 08:45:11 INFO mlflow.store.artifact.cli: Logged artifact from local file
/var/folders/6g/bg5mcmsj7s51r33snbxhm1400000gn/T//RtmpKNTLVG/file362556bc031b to
artifact_path=random
Root URI: /Users/lorenz/git/mlflow-r-casting bug/mlruns/1/4fbdbce6dd8a4251a599465ce685df5b/artifacts
Root URI: /Users/lorenz/git/mlflow-r-casting bug/mlruns/1/4fbdbce6dd8a4251a599465ce685df5b/artifacts
2020/04/18 08:45:11 INFO mlflow.projects: === Run (ID '4fbdbce6dd8a4251a599465ce685df5b') succeeded ===
2020/04/18 08:45:11 INFO mlflow.projects: === Run (ID '4fbdbce6dd8a4251a599465ce685df5b') succeeded === I think this is an relevant user-facing problem because it convolutes the terminal substantially. |
@lorenzwalthert @javierluraschi I think the fix for this might be as simple as #3145 Let me know what you think. |
FYI the fix has been merged and this can be closed now. |
System information
mlflow --version
): 1.7.0Describe the problem
Running the above code returns
The same problem can be observed in CI/CD output, e.g here. Investigating, we see that in
mlflow:::mlflow_cli()
, the CLI is invoked with therun
command from {processx} (substituting relevant arguments from the debugger):Running this in debugging mode, we see that
apparently, stdout and stderr are for some reason interchanged.this output comes from stderr. The return value of the above command (without echo):Because
echo = TRUE
and thestderr_callback
is printing to the console, we get all output twice. I believethis is a problem with the {processx} package in the first place, so I filed an issue there too (r-lib/processx#250). For the time being,we could set the stderr callback tofunction(x, p) NULL
when callingmlflow:::mlflow_cli()
frommlflow::mlflow_runs()
. Maybe you can clarify why the output does not go to stdout in the first place because to me, it would make more sense to send the output to stdout.Code to reproduce issue
Run the above command in this minimally reproducible git repo, file
R/runner.R
.The text was updated successfully, but these errors were encountered: