Databricks Machine Learning Professional Question 107
Single answerA data science team has deployed a machine learning model in Databricks' MLflow Model Registry. They want to automatically trigger a Databricks Job whenever the model transitions to the 'Production' stage to perform additional validation checks. How should they configure the Job to achieve this?
- A
Create a Databricks Job with the MLflow Model Registry as a task and set the trigger condition to 'Model stage transition'.
- B
Use the Databricks REST API to monitor model stage changes and manually trigger the Job when a model transitions to 'Production'.
- C
Configure a webhook in the Databricks MLflow Model Registry to trigger the Job when a model transitions to the 'Production' stage.
- D
Write a scheduled Databricks Job that periodically checks the model's stage in the Model Registry and runs validations if the stage is 'Production'.
Show answer and explanation
Correct answer: C
Explanation
The best way to automate task execution when a model's stage changes in the MLflow Model Registry is to use webhooks. Webhooks allow event-driven triggers, such as when a model transitions to the 'Production' stage, to automatically start a Databricks Job. This approach avoids unnecessary manual intervention or periodic polling, making it efficient and scalable.
- A. Incorrect.
This option is incorrect because there is no direct integration between a Databricks Job and the MLflow Model Registry task with a 'Model stage transition' trigger. Webhooks must be used for such event-driven workflows.
- B. Incorrect.
This option is incorrect because manually triggering a Job using the REST API would not automate the process. The goal is to implement an automated solution.
- C. Correct.
This option is correct because Databricks MLflow Model Registry supports webhooks, which can be configured to trigger a Databricks Job whenever a model transitions to a specific stage such as 'Production'.
- D. Incorrect.
This option is incorrect because while a scheduled Job could periodically check the model's stage, it introduces unnecessary latency and resource usage compared to the webhook-based solution.