Databricks Machine Learning Associate Question 633
Select 3You have trained a custom machine learning model and want to deploy it to a model endpoint in Databricks. Which of the following steps must you take to successfully deploy and expose the model as a REST API endpoint?
- A
Register the model in the Databricks Model Registry.
- B
Create a serving endpoint in Databricks and specify the model version to serve.
- C
Write a custom Flask application to host the model and deploy it manually.
- D
Ensure that the model's dependencies are specified in an environment file or requirements.txt.
- E
Use the Databricks CLI to manually start the endpoint after deployment.
Show answer and explanation
Correct answers: A, B, D
Explanation
To deploy a custom model to a Databricks model endpoint, you need to register the model in the Databricks Model Registry, create a serving endpoint, and ensure the model's dependencies are defined. This ensures that the model can be served reliably and accessed via a REST API endpoint. Databricks handles the serving process internally, so custom hosting solutions or manual CLI actions are not necessary.
- A. Correct.
Correct: Registering the model in the Databricks Model Registry is a necessary step to version your model and deploy it reliably.
- B. Correct.
Correct: Creating a serving endpoint and specifying the model version to serve is required to expose the model as a REST API endpoint in Databricks.
- C. Incorrect.
Incorrect: Writing a custom Flask application is not required when deploying models to Databricks endpoints, as Databricks provides built-in model serving capabilities.
- D. Correct.
Correct: Specifying the model's dependencies in an environment file or requirements.txt ensures that the serving environment includes the necessary libraries for the model to run.
- E. Incorrect.
Incorrect: The Databricks CLI is not required to manually start the endpoint; Databricks manages this automatically once the endpoint is created.