Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 483 of 656

Databricks Certified Machine Learning Associate. Associate level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Associate Question 483

Single answer

A data scientist has registered a machine learning model in the Databricks Model Registry. They now want to add a tag to the model to indicate its intended use case as 'Production'. Which of the following code snippets correctly sets the tag for the model?

  1. A

    mlflow.set_tag('use_case', 'Production')

  2. B

    mlflow.register_model_tag('use_case', 'Production', model_name='my_model')

  3. C

    from mlflow.tracking import MlflowClient; MlflowClient().set_registered_model_tag(name='my_model', key='use_case', value='Production')

  4. D

    from mlflow.tracking import MlflowClient; MlflowClient().set_tag('use_case', 'Production', model_name='my_model')

Show answer and explanation

Correct answer: C

Explanation

Tags for registered models in the Databricks Model Registry cannot be set using functions designed for active runs or nonexistent API methods. The correct method is to use the set_registered_model_tag function from the MlflowClient class, which allows you to specify the model name, tag key, and tag value.

  • A. Incorrect.

    This option is incorrect because mlflow.set_tag sets tags for the currently active run, not for a registered model in the Model Registry.

  • B. Incorrect.

    This option is incorrect because the mlflow.register_model_tag function does not exist in the MLflow API.

  • C. Correct.

    This option is correct because MlflowClient().set_registered_model_tag is the correct method to set a tag on a registered model in the Databricks Model Registry.

  • D. Incorrect.

    This option is incorrect because MlflowClient().set_tag is not a valid function. The correct method for setting a tag on a registered model is set_registered_model_tag.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

48 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam