QuestionQ41

VerifiedAdvanced MLflow Usage

A data scientist developed and logged a Spark ML random forest model, then ended their Spark session and terminated their cluster. After launching a new cluster, they want to examine the featureImportances of the original model object.

Which code line can restore the model object so that featureImportances is available?

Explanation

mlflow.spark.load_model(model_uri) loads the logged Spark MLlib model as a native PySpark PipelineModel, preserving access to Spark-model attributes such as featureImportances. The PyFunc interface is a generic prediction wrapper rather than the native Spark model object. MLflow Spark API

Learn more

Community Discussion

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