IniziaInizia gratis

Loading models from the Model Registry

In this exercise, you will use the scikit-learn flavor to deploy the most stable "Insurance" model from the MLflow Model Registry and then use test data to get a prediction from the model.

The model uses LogisticRegression to predict whether an insurance claim is for a male or female, which is labeled as 1 or 0. You'll load the model and then make predictions using a test set called X_test.

The MLflow module will be imported.

Questo esercizio fa parte del corso

Introduction to MLflow

Visualizza il corso

Istruzioni dell'esercizio

  • With the scikit-learn flavor, load the "Production" version of the "Insurance" model using the convention for fetching models from the Registry as the model URI.
  • Using the loaded model, run a prediction on the test data from train_test_split used during training the model.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Load the Production stage of Insurance model using scikit-learn flavor
model = ____.____.____("____")

# Run prediction on our test data
____.____(____)
Modifica ed esegui il codice