Databricks Machine Learning Associate Question 131
Select 2You are managing a machine learning model lifecycle using MLflow in Databricks. You need to transition a registered model from the 'Staging' stage to the 'Production' stage programmatically. Which of the following steps must you take using the MLflow Client API to achieve this?
- A
Use the MLflow Client's
update_model_versionmethod to specify the new stage for the model. - B
Call the MLflow Client's
transition_model_version_stagemethod with the model name, version, and desired stage. - C
Ensure that the registered model already exists in the MLflow Model Registry.
- D
Directly update the model's stage in the MLflow tracking UI.
- E
Provide a description or comment when transitioning the model's stage to document the change.
Show answer and explanation
Correct answers: B, C
Explanation
To transition a model's stage programmatically using the MLflow Client API, you must use the transition_model_version_stage method, which requires the model name, version, and target stage as inputs. Additionally, the model must already exist in the MLflow Model Registry for its stage to be transitioned. Other options like directly updating the stage in the UI or using unrelated methods do not apply to this scenario.
- A. Incorrect.
The
update_model_versionmethod is not used for transitioning model stages. It is used for updating metadata like description or tags of a model version. - B. Correct.
This is the correct method to programmatically transition a model's stage using the MLflow Client API. It allows you to change the stage of the registered model version.
- C. Correct.
The registered model must already exist in the MLflow Model Registry to transition its stage, as stage transitions can only occur for models that are tracked and registered.
- D. Incorrect.
Updating the model's stage directly in the MLflow tracking UI is a manual process, not programmatic, and is not relevant to using the MLflow Client API.
- E. Incorrect.
While adding a description is good practice, it is not a mandatory step for transitioning the stage using the MLflow Client API.