Databricks Machine Learning Associate Question 134
Select 3You are using the MLflow Client API to transition a machine learning model from the 'Staging' stage to the 'Production' stage in the Databricks Model Registry. Which of the following steps are required to successfully perform this transition?
- A
Use the
MlflowClientclass to retrieve the model's unique registered name and version. - B
Call the
transition_model_version_stagemethod from theMlflowClientclass, specifying the model name, version, and target stage ('Production'). - C
Delete the model version from the 'Staging' stage before transitioning it to 'Production'.
- D
Ensure the MLflow tracking server has write permissions for the operation to succeed.
- E
Manually edit the model's metadata to reflect the new stage before calling the transition method.
Show answer and explanation
Correct answers: A, B, D
Explanation
To transition a model's stage using the MLflow Client API, you must first retrieve the model's name and version, which uniquely identify the model in the registry. Then, you use MLflow's transition_model_version_stage method to update the stage, ensuring the tracking server has the necessary permissions to execute the change. There is no need for manual deletions or metadata editing, as MLflow automates these updates during the transition.
- A. Correct.
Correct: To transition the model, you must first retrieve its registered name and version using the
MlflowClientclass, as these are required inputs for the transition method. - B. Correct.
Correct: The
transition_model_version_stagemethod is explicitly used to transition a model's stage in the MLflow Model Registry, and you must specify the model name, version, and target stage. - C. Incorrect.
Incorrect: Deleting the model version from the 'Staging' stage is not required. MLflow automatically updates the stage without requiring a manual deletion.
- D. Correct.
Correct: The MLflow tracking server must have the appropriate write permissions to execute the stage transition successfully. Without write access, the operation will fail.
- E. Incorrect.
Incorrect: Manually editing the model's metadata is not necessary. The
transition_model_version_stagemethod handles all stage updates programmatically.