Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 145 of 280

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

Databricks Machine Learning Professional Question 145

Single answer

You are working on a Databricks project where a model has been registered in the Model Registry under the name 'customer_churn_model'. You want to load the latest version of this model in your notebook for batch inference using the MLflow load_model API. Which of the following code snippets correctly achieves this?

  1. A

    model = mlflow.pyfunc.load_model('models:/customer_churn_model/latest')

  2. B

    model = mlflow.sklearn.load_model('runs:/customer_churn_model/latest')

  3. C

    model = mlflow.pyfunc.load_model('runs:/customer_churn_model/latest')

  4. D

    model = mlflow.pyfunc.load_model('models:/customer_churn_model/1')

Show answer and explanation

Correct answer: A

Explanation

To load a registered model from the MLflow Model Registry, the correct URI format is 'models:/<model_name>/<version_or_stage>'. The stage 'latest' dynamically fetches the most recently registered version of the model. The mlflow.pyfunc.load_model API enables loading models in a generic way for inference, regardless of the specific library used during training.

  • A. Correct.

    Correct: This is the correct syntax to load the latest version of a registered model from the Model Registry using MLflow's load_model API.

  • B. Incorrect.

    Incorrect: The 'runs:/' URI is used to fetch models directly from a specific MLflow run, not from the Model Registry. Additionally, this syntax is invalid for specifying a registered model.

  • C. Incorrect.

    Incorrect: Similar to the second option, 'runs:/' points to a specific run's artifact and not a registered model. The URI is incorrect for this scenario.

  • D. Incorrect.

    Incorrect: While this syntax correctly refers to a specific version of a registered model (version 1 in this case), it does not dynamically load the latest version as required by the question.

Timed practice exam

Take a Databricks Machine Learning Professional practice test under exam conditions

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

Start timed exam