question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] using git tags in `mlflow run --version TAG` fails

See original GitHub issue

Willingness to contribute

No. I cannot contribute a bug fix at this time.

MLflow version

1.28.0

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 12.4
  • Python version: 3.9.13
  • yarn version, if running the dev UI: None

Describe the problem

First, thanks a lot for this project.

In the command mlflow run --version VVV https://..., the term version looks like you could use a git tag, and a few versions ago (I think around 1.14) this used to work.

However, in recent versions such as 1.27 and 1.28.0, using an existing git tag such as 1.0.0 just fails with:

2022/09/17 19:16:52 ERROR mlflow.cli: === Unable to checkout version '1.0.0' of git repo https://github.com/org/repo- please ensure that the version exists in the repo. Error: Cmd('git') failed due to: exit code(1)
  cmdline: git checkout 1.0.0
  stderr: 'error: pathspec '1.0.0' did not match any file(s) known to git' ===

The command only works with branch names or commit SHAs. Is that the desired behavior? The docs for this --version argument mention “Git commit references”, so it looks like tags should be accepted.

Ideally, could you please reinstate this feature? Thanks!

Tracking information

No response

Code to reproduce issue

$ pip install mlflow==1.28.0
$ mlflow run git@github.com:graelo/mlflow-example.git -v 1.0.0
2022/09/17 19:26:55 INFO mlflow.projects.utils: === Fetching project from git@github.com:graelo/mlflow-example.git into /var/folders/hb/9_9_kvm96fb7w3zrqwzp3kkh0000gn/T/tmpesd_pz9h ===
2022/09/17 19:26:57 ERROR mlflow.cli: === Unable to checkout version '1.0.0' of git repo git@github.com:graelo/mlflow-example.git- please ensure that the version exists in the repo. Error: Cmd('git') failed due to: exit code(1)
  cmdline: git checkout 1.0.0
  stderr: 'error: pathspec '1.0.0' did not match any file(s) known to git' ===

Stack trace

$ mlflow run git@github.com:graelo/mlflow-example.git -v 1.0.0
2022/09/17 19:26:55 INFO mlflow.projects.utils: === Fetching project from git@github.com:graelo/mlflow-example.git into /var/folders/hb/9_9_kvm96fb7w3zrqwzp3kkh0000gn/T/tmpesd_pz9h ===
2022/09/17 19:26:57 ERROR mlflow.cli: === Unable to checkout version '1.0.0' of git repo git@github.com:graelo/mlflow-example.git- please ensure that the version exists in the repo. Error: Cmd('git') failed due to: exit code(1)
  cmdline: git checkout 1.0.0
  stderr: 'error: pathspec '1.0.0' did not match any file(s) known to git' ===

Other info / logs

No response

What component(s) does this bug affect?

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/pipelines: Pipelines, Pipeline APIs, Pipeline configs, Pipeline Templates
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

What interface(s) does this bug affect?

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

What language(s) does this bug affect?

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

What integration(s) does this bug affect?

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AvikantSrivastavacommented, Oct 13, 2022

@BenWilson2 @graelo I have raise a PR for the fix https://github.com/mlflow/mlflow/pull/7043

can you take a look?

1reaction
graelocommented, Oct 11, 2022

Sure, i think that would be great, thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

MLflow Tracking — MLflow 2.0.1 documentation
The MLflow Tracking component is an API and UI for logging parameters, code versions, metrics, and output files when running your machine learning...
Read more >
kedro-mlflow - Release 0.11.4 Yolan Honoré-Rougé
has a command to reproduce exactly the run from a given git sha, which is not possible in Kedro. Mlflow is a clear...
Read more >
git describe fails with "fatal: No names found ... - Stack Overflow
This happens if you don't have any tags in your repository. If the repository does have tags, then ...
Read more >
Introduction to MLflow: How to Use MLflow Tracking - Databricks
Was it the python code you ran? And the Github version of that. And the important part is the run. And the run...
Read more >
mlflow.pdf
Log a batch of metrics, params, and/or tags for a run. The server will respond with an error (non-. 200 status code) if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found