Databricks Machine Learning Associate Question 133
Single answerYou are managing the lifecycle of a machine learning model registered in the MLflow Model Registry. Using the MLflow Client API, you want to transition a model version from 'Staging' to 'Production'. Which of the following methods would you use to accomplish this?
- A
mlflow.transition_model_version_stage()
- B
client.transition_model_version_stage()
- C
mlflow.update_model_version_stage()
- D
client.update_model_version_stage()
Show answer and explanation
Correct answer: B
Explanation
The MLflow Client API provides the transition_model_version_stage() method, which is used to transition a model version from one stage to another in the MLflow Model Registry. The method is accessed through the client object (e.g., client.transition_model_version_stage()), making Option 2 the correct choice.
- A. Incorrect.
This is not a valid MLflow Client API method. While it appears similar to the correct method, it is incorrectly named.
- B. Correct.
This is the correct method to transition a model version's stage using the MLflow Client API. The method allows you to change the stage of a model version in the Model Registry (e.g., from 'Staging' to 'Production').
- C. Incorrect.
This is an invalid method name as MLflow does not provide an 'update_model_version_stage()' method.
- D. Incorrect.
This is not a valid method in the MLflow Client API. It incorrectly combines elements of the correct method and an invalid name.