Databricks Machine Learning Associate Question 130
Single answerYou are managing an ML model lifecycle using MLflow in Databricks. You have just registered a model version that passed validation, and now you want to transition it to the 'Staging' stage using the MLflow Client API. Which method from the MLflow Client API should you use to perform this transition?
- A
client.update_registered_model()
- B
client.transition_model_version_stage()
- C
client.create_registered_model()
- D
client.create_model_version()
Show answer and explanation
Correct answer: B
Explanation
To transition a model version to a different stage (e.g., 'Staging' or 'Production') in the MLflow Model Registry using the MLflow Client API, you should use the transition_model_version_stage() method. This method allows you to specify the model name, version, and target stage, making it the appropriate choice for this task.
- A. Incorrect.
This method is used to update metadata for a registered model, such as its description, but it doesn't transition the model's stage.
- B. Correct.
This is the correct method to transition a model version to a new stage (e.g., 'Staging', 'Production') using the MLflow Client API.
- C. Incorrect.
This method is used to create a new registered model in the MLflow Model Registry, not to transition a model's stage.
- D. Incorrect.
This method is used to create a new model version under a registered model, not to modify its stage.