Databricks Certified Machine Learning Professional — Question 6

A machine learning engineer has developed a model and registered it using the FeatureStoreClient fs. The model has model URI model_uri. The engineer now needs to perform batch inference on customer-level Spark DataFrame spark_df, but it is missing a few of the static features that were used when training the model. The customer_id column is the primary key of spark_df and the training set used when training and logging the model.
Which of the following code blocks can be used to compute predictions for spark_df when the missing feature values can be found in the Feature Store by searching for features by customer_id?

Answer options

Correct answer: E

Explanation

Option E is correct because it directly executes batch scoring on the spark_df DataFrame, which includes the necessary feature retrieval if the features are defined in the Feature Store. Other options either misapply the feature retrieval or utilize incorrect scoring methods that do not fit the batch inference context.