mlflow: Error in process_initialize(self, private, command, args, stdin, stdout, : Command not found

System information

MLflow)**:

  • OS Platform and Distribution (windows 10 64x):
  • MLflow installed from (source):
  • MLflow version (run mlflow 0.8):
  • Python version: N/A Running in Rstudio

Script

install.packages(‘mlflow’, dependencies = T, repos = “https://cloud.r-project.org/”) mlflow::mlflow_install() library(mlflow)

mlflow_ui()

Describe the problem

when I run mllflow_ui()… i get the following error: Error in process_initialize(self, private, command, args, stdin, stdout, : Command not found

Source code / logs

Failed validating 'additionalProperties' in error:

On instance['cells'][2]['outputs'][0]:
{'ename': 'ERROR',
 'evalue': 'Error in process_initialize(self, private, command, args, '
           'stdin,...',
 'execution_count': 3,
 'output_type': 'error',
 'traceback': ['Error in process_initialize(self, private, command, args, '
               'stdin,...',
               '1. mlflow_ui()',
               '2. mlflow_ui.NULL()',
               '3. mlflow_client()',
               '4. mlflow_server(file_store = tracking_uri, port = '
               'mlflow_connec...',
               '5. do.call("mlflow_cli", c("server", args, list(background = '
               'get...',
               '6. mlflow_cli("server", "--port", 5139, "--file-store", '
               '"C:/User...',
               '7. with_envvar(env, {\n'
               ' .     if (background) {\n'
               ' .         result...',
               '8. force(code)',
               '9. process$new(mlflow_bin, args = unlist(args), echo_cmd = '
               'verbo...',
               '10. .subset2(public_bind_env, "initialize")(...)',
               '11. process_initialize(self, private, command, args, stdin, '
               'stdo...']}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 31

Most upvoted comments

The root cause of the issue flagged by @vrankenjulie is that the delegated call from R to the Mlflow_cli fails. After digging through the mlflow/R/mlflow code in git I have found how to fix this.

First add this line to the .Rprofile file in your RProject directory.

Sys.setenv(MLFLOW_VERBOSE=TRUE)

This will show the mlflow cli call being made in the R console, here is an example:

Running “C:/Users/XXX/Anaconda3/envs/r-mlflow-1.5.0/mlflow” artifacts download -u model

Now, as a result of providing the full path (and even though this path is included in the ENV path variable) windows is unable to run mlflow and fails with the following error

Command not found @win/processx.c:977

So, to fix this I added the following (again to the .Rprofile file)

Sys.setenv(MLFLOW_BIN="C:/Users/XXX/Anaconda3/envs/r-mlflow-1.5.0/Scripts/mlflow.exe")

And hey presto, all the commands that now delegate from R to the mlflow_cli work like a charm…

These are my entries in my .Rprofile which I’m using to run mlflow hosted on K8 using GCS for the artifact repo.

Sys.setenv(RETICULATE_PYTHON="C:/Users/XXX/Anaconda3/envs/r-mlflow-1.5.0")
Sys.setenv(GOOGLE_APPLICATION_CREDENTIALS="C:/Users/XXX/.googleKeys/mlflow-user.json")
Sys.setenv(MLFLOW_TRACKING_URI="http://XX.XX.XX.XXX:XXXX")
Sys.setenv(MLFLOW_VERBOSE=TRUE)
Sys.setenv(MLFLOW_BIN="C:/Users/XXX/Anaconda3/envs/r-mlflow-1.5.0/scripts/mlflow.exe")

Thank you for interacting with this issue! Removing the stale label!