Databricks Machine Learning Professional Question 127
Select 4You are tasked with deploying a machine learning model for batch inference in Databricks. The model is trained to predict customer churn based on historical data, and predictions need to be written back to a Delta table for further analysis. Which of the following steps are essential for correctly deploying the batch inference pipeline?
- A
Load the model from the MLflow registry using its registered name and version.
- B
Use Spark to read the input data from a Delta table and preprocess it as required by the model.
- C
Deploy the model to an online endpoint for real-time predictions.
- D
Use Spark’s distributed capabilities to parallelize the inference process for scalability.
- E
Write the prediction results to a Delta table for downstream consumption.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
Batch inference pipelines in Databricks leverage Spark's distributed processing to handle large datasets efficiently. Key steps include loading the model, preprocessing input data, running inference in a scalable manner, and storing results back to a Delta table for further use. Unlike real-time inference, batch inference does not involve deploying the model to an online endpoint, as predictions are processed in bulk.
- A. Correct.
Correct: Loading the model from the MLflow registry is essential to ensure you are using the correct version of the model for batch inference.
- B. Correct.
Correct: Reading and preprocessing the input data using Spark is necessary to prepare the data in the format expected by the model.
- C. Incorrect.
Incorrect: Deploying the model to an online endpoint is not required for batch inference, as the focus is on processing data in batches, not real-time predictions.
- D. Correct.
Correct: Using Spark’s distributed capabilities allows the inference process to scale efficiently across large datasets, which is a key advantage of Databricks.
- E. Correct.
Correct: Writing the prediction results back to a Delta table enables downstream applications and teams to access the inference results for further analysis.