Exercise

Saving and loading a model

With the Model API, models can be shared between developers who may not have access to the same MLflow Tracking server by using a local filesystem.

In this exercise, you will train a new LinearRegression model from an existing one using the Unicorn dataset. First, you will load an existing model from the local filesystem. Then you will train a new model from the existing model and save it back to the local filesystem.

The existing model has been saved to the local filesystem in a directory called "lr_local_v1". The mlflow module will be imported.

Instructions

100 XP
  • Load the model from the local filesystem directory "lr_local_v1" using scikit-learn library from the MLflow module.
  • Using the scikit-learn library from the mlflow module, save the model locally to a directory called "lr_local_v2".