Databricks Machine Learning Associate Question 381
Single answerA data science team at a company has built a machine learning model to predict customer churn. The model is trained locally in a Databricks notebook and performs well during evaluation. The team now wants to deploy the model and enable its predictions to be consumed by multiple applications in real-time. Which approach would be the most suitable for distributing the model at scale?
- A
Export the model as a pickle file and share it via email with application developers.
- B
Save the model to the Databricks Model Registry and deploy it as a REST API using Databricks Model Serving.
- C
Manually copy the model’s code and dependencies to each application that requires predictions.
- D
Deploy the model on an edge device for real-time predictions without using Databricks infrastructure.
Show answer and explanation
Correct answer: B
Explanation
The best way to scale and distribute a machine learning model in Databricks is to save it to the Databricks Model Registry and deploy it as a REST API using Databricks Model Serving. This approach ensures the model can handle real-time predictions and be accessed by multiple applications efficiently. Other options either lack scalability, are insecure, or are not aligned with Databricks' infrastructure for model distribution.
- A. Incorrect.
This approach is not scalable or secure. Sharing a pickle file through email increases the risk of data corruption and limits accessibility for large-scale, real-time predictions.
- B. Correct.
This is the correct answer. The Databricks Model Registry allows the team to manage the model lifecycle, and deploying the model as a REST API using Databricks Model Serving ensures scalability, accessibility, and support for real-time predictions.
- C. Incorrect.
This approach is inefficient and error-prone. Manually copying code and dependencies increases the risk of inconsistency and makes it difficult to update or maintain the model across multiple applications.
- D. Incorrect.
This is not a suitable option for centralized real-time predictions in a scalable environment. Deploying on an edge device is specific to use cases requiring local predictions and does not leverage Databricks infrastructure for model distribution.