mlflowmlops

How can I load the latest model version from MLflow model registry?


I can load a specific version of a model using the mlflow client:

import mlflow

model_version = 1

model = mlflow.pyfunc.load_model(
    model_uri=f"models:/c3760a15e6ac48f88ad7e5af940047d4/{model_version}"
)

But is there a way to load the latest model version?


Solution

  • There is no such thing, like load latest, but:

    So you need to define what latest means for you.