Certified Machine Learning Professional Practice Test
Certified Machine Learning Professional Practice Test practice questions, page 9 of 9, with answer review and explanations.
Question 41
A machine learning engineer has developed a random forest model using scikit-learn, logged the model using MLflow as random_forest_model, and stored its run ID in the run_id Python variable. They now want to deploy that model by performing batch inference on a Spark DataFrame spark_df. Which of the following code blocks can they use to create a function called predict that they can use to complete the task?
It is not possible to deploy a scikit-learn model on a Spark DataFrame.
Question 42
Which of the following describes the purpose of the context parameter in the predict method of Python models for MLflow?
The context parameter allows the user to specify which version of the registered MLflow Model should be used based on the given application's current scenario
The context parameter allows the user to document the performance of a model after it has been deployed
The context parameter allows the user to include relevant details of the business case to allow downstream users to understand the purpose of the model
The context parameter allows the user to provide the model with completely custom if-else logic for the given application's current scenario
The context parameter allows the user to provide the model access to objects like preprocessing models or custom configuration files
Question 43
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?