Databricks Machine Learning Associate exam dumps

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

Single answer

You are working on a machine learning project in Databricks and want to organize your registered models by adding metadata. Specifically, you want to add a 'stage' tag with the value 'production' to a model version. Which of the following code snippets will correctly set this tag?

  1. A

    mlflow.set_model_tag('stage', 'production')

  2. B

    mlflow.set_tag('stage', 'production')

  3. C

    mlflow.register_model_tag('model_name', 'stage', 'production')

  4. D

    mlflow.tracking.MlflowClient().set_model_version_tag('model_name', '1', 'stage', 'production')

Show answer and explanation

Correct answer: D

Explanation

To set or modify a tag for a specific registered model version in Databricks, you need to use the set_model_version_tag method from the MLflow Client API. This method requires the model name, version number, tag name, and tag value as inputs. The other options provided either refer to non-existent methods or are used for setting tags in different contexts (such as runs).

  • A. Incorrect.

    This option is incorrect because 'mlflow.set_model_tag' is not a valid function in the MLflow library.

  • B. Incorrect.

    This option is incorrect because 'mlflow.set_tag' is used to set tags on runs, not on models.

  • C. Incorrect.

    This option is incorrect because 'mlflow.register_model_tag' is not a valid function in the MLflow library.

  • D. Correct.

    This option is correct because 'mlflow.tracking.MlflowClient().set_model_version_tag' is the correct function to set a tag on a specific model version. You need to specify the model name, version, key (tag name), and value.

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