Databricks Machine Learning Associate exam dumps

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

Single answer

You are working on a machine learning project in Databricks and have successfully trained a model. You now want to register this model in the MLflow Model Registry using the MLflow Client API. Which of the following code snippets correctly registers the model?

  1. A

    from mlflow.tracking import MlflowClient client = MlflowClient() model_uri = 'runs:/12345abcde/my_model' client.create_registered_model('my_model', model_uri)

  2. B

    from mlflow.tracking import MlflowClient client = MlflowClient() model_uri = 'runs:/12345abcde/my_model' client.create_model_version('my_model', model_uri, 'my_experiment')

  3. C

    from mlflow.tracking import MlflowClient client = MlflowClient() model_uri = 'runs:/12345abcde/my_model' client.create_model_version(name='my_model', source=model_uri, run_id='12345abcde')

  4. D

    from mlflow.tracking import MlflowClient client = MlflowClient() model_uri = 'runs:/12345abcde/my_model' client.register_model('my_model', model_uri)

Show answer and explanation

Correct answer: C

Explanation

To register a model using the MLflow Client API, you must use the create_model_version method. This method requires the model name (name), the model URI (source), and the run ID (run_id) associated with the model. Other methods like create_registered_model or register_model do not exist in the MLflow Client API and will result in errors.

  • A. Incorrect.

    Incorrect: The create_registered_model method does not exist in the MLflow Client API. You cannot use this to register a model.

  • B. Incorrect.

    Incorrect: The create_model_version method requires the run_id parameter, and 'my_experiment' is not a valid input for that parameter.

  • C. Correct.

    Correct: This is the correct way to register a model using the create_model_version method. The name parameter specifies the model name, source specifies the model URI, and run_id specifies the ID of the run associated with the model.

  • D. Incorrect.

    Incorrect: The register_model method does not exist in the MLflow Client API. You cannot use this to register a model.

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