Databricks Machine Learning Associate Question 380
Single answerYou are a data scientist working on deploying an ML model for a real-time fraud detection system. The model needs to be accessed by multiple services at scale, with minimal latency and high availability. Which approach would best facilitate the distribution of your model while meeting these requirements?
- A
Deploy the model as a REST API using a scalable serving infrastructure like Databricks Model Serving or MLflow Model Serving.
- B
Save the model locally as a pickle file and load it directly in each service's runtime environment.
- C
Deploy the model as a batch job that processes data periodically and stores the predictions in a database.
- D
Embed the model into each service’s codebase to ensure it is locally available for predictions.
Show answer and explanation
Correct answer: A
Explanation
To scale ML models effectively for real-time use cases, deploying the model as a REST API using a scalable serving infrastructure such as Databricks Model Serving or MLflow Model Serving is the best practice. This ensures centralized management, low latency, and high availability, which are critical for a real-time fraud detection system.
- A. Correct.
This is the correct approach as it provides a scalable, centralized, and low-latency solution for serving predictions to multiple services. Databricks Model Serving or MLflow Model Serving can handle high availability and scaling requirements.
- B. Incorrect.
This approach is not scalable or efficient for real-time scenarios, as each service would need to load the model independently, leading to higher latency and maintenance challenges.
- C. Incorrect.
Batch jobs are suitable for non-real-time processing but do not meet the real-time, low-latency requirements of this scenario.
- D. Incorrect.
Embedding the model into each service increases redundancy, makes updates difficult, and does not support scalability or centralized management efficiently.