Exercise

Registering new models

The MLflow Model Registry can also register models during a training run. This is helpful because it enables logging and registering a model under the same function.

In this exercise, you will use the scikit-learn flavor to register a model to the Model Registry during a training run when the model is logged to MLflow Tracking. You will then search the Model Registry to ensure the model was registered.

This model will be registered alongside existing registered models that were trained on the "Insurance" training data. The model has already been trained and set to the variable lr. When searching the Model Registry, an instance of MLflowClient() has been set to client and the filter string has already been created as insurance_filter_string.

Instructions

100 XP
  • Register the lr model to "Insurance" using the scikit-learn flavor.
  • Search the Model Registry to ensure that the model was registered.