Cannot log artifact in azure ml using mlflow
- Package Name: azure-ai-ml and aure-mlflow
- Package Version: 1.28.1 and 1.60.0
- Operating System: Ubuntu 24
- Python Version: 3,10
Describe the bug Logging an artifact or image on azure crashing due to unknown tracking_uri argument
To Reproduce Steps to reproduce the behavior:
- Start a job
- Save an artifact
- Crash
Crash is
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/tracking/fluent.py", line 1427, in log_artifact
MlflowClient().log_artifact(run_id, local_path, artifact_path)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/tracking/client.py", line 2465, in log_artifact
self._tracking_client.log_artifact(run_id, local_path, artifact_path)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/tracking/_tracking_service/client.py", line 644, in log_artifact
artifact_repo = self._get_artifact_repo(run_id)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/tracking/_tracking_service/client.py", line 627, in _get_artifact_repo
artifact_repo = get_artifact_repository(artifact_uri)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/store/artifact/artifact_repository_registry.py", line 143, in get_artifact_repository
return _artifact_repository_registry.get_artifact_repository(artifact_uri, tracking_uri)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/mlflow/store/artifact/artifact_repository_registry.py", line 81, in get_artifact_repository
return repository(artifact_uri, tracking_uri=tracking_uri)
TypeError: azureml_artifacts_builder() got an unexpected keyword argument 'tracking_uri'
Expected behavior A clear and concise description of what you expected to happen.
The artifact should be logged correctly
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
@MalcolmMielle - Can you please share your logging code. I just ran sample from example repo, and it logged the artifacts. https://github.com/Azure/azureml-examples/blob/902929725e8d713447c99f80e4530c83075ecd9b/cli/jobs/basics/hello-mlflow.yml#L3
it could be the environment that you are using may not have azureml-mlfow?
My environment has azureml-mlflow==1.60.0 (I do a pip freeze at the end of building it to make sure).
I alos have mlflow-skinny==3.2.0rc0 and I know the problem is with the newer version of mlflow because working with older version of mlflow works.
My code is simply:
mlflow.log_artifact(fig, "log_figure.png")
I'll try to get more information later
@MalcolmMielle @achauhan-scc I had the same issue and after some days of investigation I finally found the root cause. It's related to mlflow or mlflow-skinny versions. azureml-mlflow is incompatible with "mlflow>=3.0.0". Since azureml-mlflow does not restrict its mlflow to <3.0.0 you can cause this error after each new dependecy resolution. A fix should be to prevent azureml-mlflow from allowing mlflow>3.0.0
@inarighas downgrading mlflow fixed the issue for me.
Do we have MR handling this issue? thanks
When will azureml-mlflow be made compatible with mlflow v3?
Compatibility of azureml-mlflow with mlflow v3 is key for our team, not only for functionality but also for patching security vulnerabilities.
I encountered the same issue, but I found a solution. Please edit the relevant section of the following file. This resolved it in my case.
.venv/lib/python3.10/site-packages/mlflow/store/artifact/artifact_repository_registry.py
# L81
return repository(artifact_uri)
(delete tracking_uri.)
I also have this issue.
please use azureml-mlflow == 1.60.0.post1 version. this version is restricting the mlflow-skinny to < 3. This version has this restriction since April 2025. https://libraries.io/pypi/azureml-mlflow/1.60.0.post1.
Hi @MalcolmMielle. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @MalcolmMielle, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.
When will the version of azureml-mlflow be updated to work with mlflow >= 3?
Please use azureml-mlflow > 1.60.0.post1 in order to use mlflow > 3. These versions have the compatibility with mlflow > 3