Databricks Machine Learning Professional exam dumps

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

Select 3

You are working on a machine learning project in Databricks and have logged multiple models using MLflow's log_model() method. Now, you want to programmatically load one of these models from the MLflow Model Registry and use it for batch inference on a new dataset. Which of the following steps are necessary to achieve this?

  1. A

    Use the mlflow.pyfunc.load_model() function with the model's URI to load the model into your Python environment.

  2. B

    Use the mlflow.get_registry_model() function to directly fetch the model from the Model Registry.

  3. C

    Provide the model's registered model name and version or stage in the URI for mlflow.pyfunc.load_model().

  4. D

    Use the model.predict() method to apply the loaded model on the batch data.

  5. E

    Manually download the model artifacts from the Databricks File System (DBFS) before loading it into your environment.

Show answer and explanation

Correct answers: A, C, D

Explanation

To programmatically load and use a model from the MLflow Model Registry, you need to use the mlflow.pyfunc.load_model() function with the appropriate model URI, which includes the registered model name and its version or stage. Once the model is loaded, you can use its predict() method to generate predictions on new data. Manual artifact downloads or non-existent functions like mlflow.get_registry_model() are not required.

  • A. Correct.

    This is correct. The mlflow.pyfunc.load_model() function is the standard way to load a model programmatically from MLflow using its URI.

  • B. Incorrect.

    This is incorrect. There is no function called mlflow.get_registry_model() in MLflow. Models are accessed via URIs and loaded with functions like mlflow.pyfunc.load_model().

  • C. Correct.

    This is correct. When accessing a registered model, the URI must include the model's name and either its version (e.g., models:/my_model/1) or stage (e.g., models:/my_model/Production).

  • D. Correct.

    This is correct. Once the model is loaded, its predict() method can be used to perform inference on the batch data.

  • E. Incorrect.

    This is incorrect. Models registered in MLflow Model Registry do not need to be manually downloaded; they can be accessed programmatically using MLflow's APIs.

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