Databricks Machine Learning Associate Question 649
Select 3You have trained a machine learning model for fraud detection using Databricks MLflow. Your team wants to deploy the model as a REST API for real-time inference. Which of the following steps are required to successfully deploy the model and query it for inference?
- A
Register the model in the MLflow Model Registry.
- B
Deploy the model as an MLflow REST API endpoint using Databricks Serving.
- C
Run batch inference to test the model’s accuracy before deployment.
- D
Obtain the REST API endpoint URL and authentication token for querying the model.
- E
Write custom code to expose the model as a REST API outside of Databricks.
Show answer and explanation
Correct answers: A, B, D
Explanation
To deploy a model for real-time inference in Databricks, you must first register it in the MLflow Model Registry to version and manage the model. Next, you can use Databricks Serving to deploy the model as a REST API endpoint. After deployment, the REST API endpoint URL and authentication token are required for querying the model for inference. Writing custom code to expose the model as a REST API is unnecessary because Databricks provides native support for this functionality.
- A. Correct.
Correct: Registering the model in the MLflow Model Registry is a required step to manage and version the model before deployment.
- B. Correct.
Correct: Databricks Serving allows you to deploy a model as a REST API endpoint for real-time inference.
- C. Incorrect.
Incorrect: While batch inference is useful for testing, it is not a required step for deploying a model for real-time inference using Databricks Serving.
- D. Correct.
Correct: After deploying the model, you need the REST API endpoint URL and authentication token to query the model for inference.
- E. Incorrect.
Incorrect: Databricks provides native support for exposing models as REST APIs via Databricks Serving, so writing custom code is unnecessary.