Databricks Machine Learning Professional Question 132
Select 3A data scientist is tasked with deploying a machine learning model for batch inference in Databricks. The goal is to compute predictions on a large dataset and save the results for later use. Which of the following steps are required to correctly implement batch deployment using Databricks?
- A
Load the input data into a DataFrame and apply the model's prediction function to compute predictions.
- B
Use Databricks Model Serving to directly deploy the model for real-time predictions.
- C
Save the predictions to a persistent storage system like Delta Lake for later use.
- D
Set up a Databricks Job to orchestrate the batch inference pipeline and schedule it if needed.
- E
Use the Databricks REST API to trigger the model's endpoint for each data point individually.
Show answer and explanation
Correct answers: A, C, D
Explanation
Batch deployment involves using the model's prediction function to process a dataset in bulk, saving the results for later use, and automating the pipeline with tools like Databricks Jobs. Real-time serving tools like Databricks Model Serving or individual REST API calls are not suitable for batch inference scenarios.
- A. Correct.
This is correct. In batch deployment, input data is typically processed in bulk, and predictions are computed using the model's prediction function applied to a DataFrame or similar structure.
- B. Incorrect.
This is incorrect. Databricks Model Serving is designed for real-time predictions, not batch processing.
- C. Correct.
This is correct. After computing predictions, saving them to a persistent storage system like Delta Lake ensures they can be accessed and used later.
- D. Correct.
This is correct. To automate and schedule batch inference, a Databricks Job is typically used to orchestrate the process.
- E. Incorrect.
This is incorrect. Invoking the model's REST API for each data point individually is inefficient and better suited for real-time, low-latency use cases, not batch processing.