Databricks Machine Learning Associate Question 444
Select 3You are tasked with scoring a machine learning model using features stored in a feature store table in Databricks. The feature table contains the necessary features for scoring, and the model has been registered in the MLflow Model Registry. Which of the following steps should you perform to score the model using data from the feature store?
- A
Use the
FeatureStoreClientto load the feature data into a DataFrame. - B
Retrieve the model from the MLflow Model Registry using the
mlflow.pyfunc.load_modelfunction. - C
Join the feature store table with the input data using the
fs.read_tablemethod. - D
Use the
FeatureStoreClient.score_batchmethod to score the model with the features. - E
Directly pass the feature store table path to the
mlflow.pyfunc.load_modelfunction for scoring.
Show answer and explanation
Correct answers: A, B, D
Explanation
To score a machine learning model using features from a feature store table in Databricks, you need to first load the feature data using the FeatureStoreClient and access the model from the MLflow Model Registry. Once the features and model are available, you can use the FeatureStoreClient.score_batch method to score the model in a batch setting. Additional steps, such as joining feature tables, are only required if the feature data needs preprocessing or enrichment.
- A. Correct.
Correct: The
FeatureStoreClientis used to access and load feature data from the feature store into a DataFrame, which can then be used for model scoring. - B. Correct.
Correct: The model must be retrieved from the MLflow Model Registry using
mlflow.pyfunc.load_modelor a similar method to load the model for scoring. - C. Incorrect.
Incorrect: While you can read feature data using
fs.read_table, joining the table is not a necessary step for scoring if the feature data is already prepared. - D. Correct.
Correct: The
FeatureStoreClient.score_batchmethod provides a streamlined way to score a model using features from a feature store in a batch setting. - E. Incorrect.
Incorrect: The feature store table path cannot be directly passed to
mlflow.pyfunc.load_modelfor scoring. The model and features must be handled separately.