QuestionQ22
Custom Model ServingA Machine Learning Engineer is developing a script to score a large batch of customer data with a SparkML RandomForestClassificationModel registered in Unity Catalog. They want to follow commonly accepted coding best practices for this model.
Which approach best meets their needs?
- A Load the model using MLflow’s mlflow.spark.load_model method, then perform batch predictions with RandomForestClassificationModel.transform().
- B Provide the URI of the registered Unity Catalog model to Spark’s DataFrame predict method to perform batch predictions.
- C Load the model using MLflow’s mlflow.pyfunc.spark_udf method, then perform batch predictions with RandomForestClassificationModel.transform().
- D Provide the URI of the registered Unity Catalog model to the Databricks ai_query function to perform batch predictions.
Community Discussion