Databricks Machine Learning Associate Question 482
Select 3You are managing a model registry in Databricks and want to add metadata to a registered model to categorize it by its use case. Which of the following steps are necessary to set a tag for the model?
- A
Use the MLflow client and call the
set_tagmethod with the model name and the desired tag key-value pair. - B
Navigate to the Databricks UI, find the registered model, and manually add the tag under the 'Tags' section.
- C
Use the MLflow client and call the
log_parammethod to add the tag as a parameter to the registered model. - D
Ensure you have permission to modify the model registry before setting the tag.
- E
Use the MLflow client and call the
delete_tagmethod to set a new tag for the model.
Show answer and explanation
Correct answers: A, B, D
Explanation
To set a tag for a registered model in Databricks, you can either use the MLflow client and call the set_tag method or manually add the tag through the Databricks UI. However, you need the appropriate permissions to modify the model registry. The log_param method and delete_tag method are not applicable for setting tags.
- A. Correct.
Correct: Using the MLflow client and calling the
set_tagmethod is a valid way to set a tag for a registered model programmatically. - B. Correct.
Correct: Tags can also be manually added through the Databricks UI by navigating to the registered model's details page.
- C. Incorrect.
Incorrect: The
log_parammethod is used for logging parameters with runs, not for setting tags on a registered model. - D. Correct.
Correct: Permissions to modify the model registry are required to perform actions like setting or removing tags.
- E. Incorrect.
Incorrect: The
delete_tagmethod is used to remove an existing tag, not to set a new one.