Get startedGet started for free

Registering existing models

In this exercise, you will take two existing MLflow Models and register them to the MLflow Model Registry to begin managing the lifecycle of both models. Each of these models was trained using the "Insurance" data at a previous date to predict if an insurance claim was for a male or female.

The first model can be found in the local directory "model_2022" and was never logged to MLflow Tracking. The second model was logged to MLflow Tracking under the artifact URI of "model_2023". Its run_id attribute has been saved as a variable named "run_id".

The mlflow module will be imported.

This exercise is part of the course

Introduction to MLflow

View Course

Exercise instructions

  • Register the first model in directory model_2022 as a model named "Insurance".
  • Register the second model to "Insurance" using an f-string literal for run_id and the artifact URI.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Register the first (2022) model
____.____("____", "____")

# Register the second (2023) model
____.____(f"____", "____")
Edit and Run Code