Model Registry: Support load_model for runs
What does this MR do and why?
This MR adds support for downloading artifacts from a Run using MLflow. See below example on how to load the run
import os
import mlflow.pyfunc
import mlflow
os.environ['MLFLOW_TRACKING_TOKEN'] = 'glpat-<redacted>'
os.environ['MLFLOW_TRACKING_URI'] = "http://127.0.0.1:3000/api/v4/projects/7/ml/mlflow/"
mlflow.set_tracking_uri(os.environ['MLFLOW_TRACKING_URI'])
mlflow.pyfunc.load_model(f"runs:/6ac0ba4c-39fb-4a41-b469-fef2bb108105/", dst_path="models")
This downloads the artifacts in a local directory called models.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #509595 (closed)
Edited by Fred de Gier