QuestionQ152

Custom Model Serving

A machine learning engineer registered an sklearn model in the MLflow Model Registry using the sklearn model flavor and a UI model_uri.

Which operation can load the model as an sklearn object for batch deployment?

  • A mlflow.spark.load_model(model_uri)
  • B mlflow.pyfunc.read_model(model_uri)
  • C mlflow.sklearn.read_model(model_uri)
  • D mlflow.pyfunc.load_model(model_uri)
  • E mlflow.sklearn.load_model(model_uri)
Explanation

mlflow.sklearn.load_model(model_uri) loads the sklearn flavor from an MLflow model URI and returns a scikit-learn model object. The MLflow sklearn API explicitly supports registered-model URI forms, while mlflow.pyfunc.load_model loads the generic PyFunc representation rather than the native sklearn object.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!