Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 484 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 484

Select 4

You are managing a machine learning model registered in the Databricks Model Registry. You want to add a new tag to the model to specify the department responsible for maintaining it, and later remove the tag when no longer needed. Which of the following code snippets correctly implement these actions?

  1. A

    mlflow.set_tag('department', 'finance')

  2. B

    mlflow.delete_tag('department')

  3. C

    mlflow.register_model_tag('department', 'finance')

  4. D

    mlflow.log_model_tag('department', 'finance')

  5. E

    from mlflow.tracking import MlflowClient; MlflowClient().set_registered_model_tag('model_name', 'department', 'finance')

  6. F

    from mlflow.tracking import MlflowClient; MlflowClient().delete_registered_model_tag('model_name', 'department')

Show answer and explanation

Correct answers: A, B, E, F

Explanation

In Databricks, tags are useful for adding metadata to models. Tags can be applied to active runs or registered models in the Model Registry. The mlflow.set_tag() and mlflow.delete_tag() functions are used for managing tags on active runs, while the MlflowClient methods, like set_registered_model_tag() and delete_registered_model_tag(), are used for managing tags on registered models. Understanding when and how to use these functions is critical for managing metadata in a Databricks environment.

  • A. Correct.

    Correct. The mlflow.set_tag() function is used to add a tag to the current active run, allowing metadata (like department) to be associated with a model.

  • B. Correct.

    Correct. The mlflow.delete_tag() function removes a tag from the current active run.

  • C. Incorrect.

    Incorrect. The function mlflow.register_model_tag() does not exist in MLflow's API.

  • D. Incorrect.

    Incorrect. The function mlflow.log_model_tag() does not exist in MLflow's API.

  • E. Correct.

    Correct. The MlflowClient().set_registered_model_tag() function is used to set a tag on a registered model in the Model Registry, specifying the model name, tag key, and tag value.

  • F. Correct.

    Correct. The MlflowClient().delete_registered_model_tag() function is used to remove a tag from a registered model in the Model Registry.

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