python-3.xmlflowmlops

mlflow run git-uri clone to specific directory


I am using mlflow run with a GitHub uri.

When I run using the below command

mlflow run <git-uri>

The command sets up a conda environment and then clones the Git repo into a temp directory, But I need it setup in a specific directory

I checked the entire document, but I can't find it. Is there no such option to do so in one shot?


Solution

  • For non-local URIs, MLflow uses the Python's tempfile.mkdtemp function (source code), that creates the temporary directory. You may have some control over it by setting the TMPDIR environment variable as described in Python docs (it lists TMP & TEMP as well, but they didn't work for me on MacOS) - but it will set only "base path" for temporary directories and files, the directory/file names are still will be random.