Skip to content

Conversation

@omermaim
Copy link
Contributor

@omermaim omermaim commented Dec 22, 2025

…n new version of mlflow

📝 Description

upgraded mlflow version to 3.0.0


🛠️ Changes Made

changed logic in model retrievel due to new mlflow objects. the models are no longer in list_artifacts function


✅ Checklist

  • I updated the documentation (if applicable)
  • I have tested the changes in this PR
  • I confirmed whether my changes are covered by system tests
    • If yes, I ran all relevant system tests and ensured they passed before submitting this PR
    • I updated existing system tests and/or added new ones if needed to cover my changes
  • If I introduced a deprecation:

🧪 Testing

ran alll tracker unit tests that is the only package that has this library.


🔗 References


🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

removes mlflow from the mlrun/mlrun image.

@omermaim omermaim requested review from a team and liranbg as code owners December 22, 2025 12:59
@omermaim omermaim changed the title mlflow version 3.0.0, changed logic in tracker due to object change i… [DEPRECATIONS] mlflow version 3.0.0 Dec 22, 2025
Copy link
Member

@theSaarco theSaarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our general approach should be to not install the mlflow package unless specifically asked for. This means that we want to remove this package from the complete extra, and install it only if the user asks for the mlflow extra. This will reduce our exposure to the package and its possible vulns and dependencies.
I've added some comments explaining the exact changes that are needed to facilitate this.
@liranbg, @guy1992l - FYI.

dependencies.py Outdated
],
"redis": ["redis~=4.3"],
"mlflow": ["mlflow~=2.22"],
"mlflow": ["mlflow~=3.0.0"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having discussed this in the release-tracking meeting, we want to remove the mlflow requirement from the complete extra. This means that this line should be removed from here, and added below (see L84 and further) so that when users ask for mlrun["mlflow"] they get just mlflow, and to install complete + mlflow they'll need to do install mlrun["complete, mlflow"].

redis~=4.3
graphviz~=0.20.0
mlflow~=2.22
mlflow~=3.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, this also needs to be removed so we don't install this package by default in our images.

@jond01
Copy link
Member

jond01 commented Dec 23, 2025

🚨 Breaking Changes?

  • Yes (explain below)
  • [ x] No

@omermaim - please mark this as a breaking change :) Also in Jira

dependencies.py Outdated
{
"dev-postgres": ["pytest-mock-resources[postgres]~=2.12"],
"kfp18": ["mlrun_pipelines_kfp_v1_8[kfp]~=0.6.0"],
"mlflow": ["mlflow~=3.0.0"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we went all the way up to 3, why ~=3.0.0 and not 3.8.0? Does something break for us between 3.0 and 3.8?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the ticket it said to move to version 3.0.0. Anyway this change should support later versions as well.

Copy link
Member

@theSaarco theSaarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@guy1992l guy1992l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERY GOOD JOB :)

dependencies.py Outdated
{
"dev-postgres": ["pytest-mock-resources[postgres]~=2.12"],
"kfp18": ["mlrun_pipelines_kfp_v1_8[kfp]~=0.6.0"],
"mlflow": ["mlflow~=3.0.0"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the ticket it said to move to version 3.0.0. Anyway this change should support later versions as well.

dependencies.py Outdated
{
"dev-postgres": ["pytest-mock-resources[postgres]~=2.12"],
"kfp18": ["mlrun_pipelines_kfp_v1_8[kfp]~=0.6.0"],
"mlflow": ["mlflow~=3.0.0"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gilad-shaham @theSaarco

mlflow~=3.0.0 is very strict. Question is should we strict it as security violations do not exist for it or should we move to mlflow~=3.0. The changes in their SDK and API should be fine.

@@ -1 +1,2 @@
mlrun-pipelines-kfp-v1-8[kfp]~=0.6.0
mlflow~=3.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here...

"aioresponses": {"~=0.7"},
"testcontainers[k3s]": {"~=4.10.0"},
"scikit-learn": {"~=1.5.2"},
"mlflow": {"~=3.0.0"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment on lines +442 to +445
local_model_path = mlflow.artifacts.download_artifacts(
artifact_uri=str(model_uri)
)
model_path = pathlib.Path(local_model_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the headline comments.

Suggested change
local_model_path = mlflow.artifacts.download_artifacts(
artifact_uri=str(model_uri)
)
model_path = pathlib.Path(local_model_path)
# Download the model and set the path to local path:
local_model_path = mlflow.artifacts.download_artifacts(
artifact_uri=str(model_uri)
)
model_path = pathlib.Path(local_model_path)

filter_string=f"source_run_id = '{mlflow_run.info.run_id}'"
)

model_uri = logged_models.iloc[0].artifact_location
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add output_format="list" to search_logged_models to get a list instead of DataFrame.

@guy1992l guy1992l changed the title [DEPRECATIONS] mlflow version 3.0.0 [DEPRECATIONS] Support mlflow version 3.x Dec 23, 2025
@liranbg liranbg merged commit 881c3cf into mlrun:development Dec 23, 2025
14 checks passed
@omermaim omermaim deleted the ML-11565 branch December 24, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants