Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 144 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 144

Single answer

You have trained a machine learning model for predicting customer churn and registered the model in the MLflow Model Registry under the name 'churn_model'. You now want to load the latest version of this model into your Databricks workspace for batch inference. Which of the following code snippets correctly loads the registered model?

  1. A

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

  2. B

    model = mlflow.pyfunc.load_model('models:/churn_model/production')

  3. C

    model = mlflow.sklearn.load_model('models:/churn_model/latest')

  4. D

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

Show answer and explanation

Correct answer: A

Explanation

When working with MLflow's Model Registry, the 'mlflow.pyfunc.load_model' function is used to load registered models in a format-agnostic way. To load the latest version of a registered model, the correct syntax is 'models:/<model_name>/latest'. This ensures that the most recently registered version of the model is retrieved for use.

  • A. Correct.

    This is the correct way to load the latest version of a registered model using MLflow's pyfunc interface, which is designed for loading models in a format-agnostic way.

  • B. Incorrect.

    This is incorrect because 'production' is not a valid stage identifier for loading models. The correct syntax for loading a model from a specific stage is 'models:/<model_name>/'.

  • C. Incorrect.

    This is incorrect because while the sklearn module can load scikit-learn models, it is not used for loading models registered in the MLflow Model Registry.

  • D. Incorrect.

    This is incorrect because 'models:/<model_name>/' refers to a specific version of a registered model, not the latest version. To load the latest version, you must use 'latest' instead of a numerical version.

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