Databricks Machine Learning Professional exam dumps

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

Select 2

You are using MLflow to manage your machine learning experiments. You want to programmatically access the best-performing model's artifacts (e.g., the model file) from the experiment with the name 'Sales_Prediction_Experiment' in order to deploy it. Which of the following steps should you take to correctly retrieve the model artifacts?

  1. A

    Use the mlflow.search_experiments() method to retrieve the experiment ID for 'Sales_Prediction_Experiment'.

  2. B

    Query the MLflow tracking server using mlflow.search_runs() to filter the runs of the experiment and find the run with the highest metric value.

  3. C

    Use mlflow.get_artifact_uri() with the run ID of the best-performing run to get the URI of the model artifacts.

  4. D

    Invoke mlflow.load_model() directly with the experiment name to retrieve the best model from the experiment.

  5. E

    Use mlflow.register_model() with the run ID to register the model and retrieve its artifacts.

Show answer and explanation

Correct answers: B, C

Explanation

To programmatically access a model's artifacts from an MLflow experiment, you need to first identify the experiment's runs and find the one with the highest performance metric (e.g., accuracy). This can be done using mlflow.search_runs(). Once the best run is identified, you can retrieve the artifacts' URI using mlflow.get_artifact_uri() with the run ID. This workflow ensures you are programmatically retrieving the correct model for deployment.

  • A. Incorrect.

    Incorrect. The mlflow.search_experiments() method does not exist. Instead, you can use mlflow.get_experiment_by_name() or similar methods to get an experiment's details, including its ID.

  • B. Correct.

    Correct. The mlflow.search_runs() method allows you to query all runs for the specified experiment (using its ID) and filter them based on metrics to determine the best-performing run.

  • C. Correct.

    Correct. Once you identify the best-performing run (using its run ID), you can use mlflow.get_artifact_uri() to programmatically get the URI to the model artifacts stored for that run.

  • D. Incorrect.

    Incorrect. The mlflow.load_model() function does not take an experiment name as input. It requires the specific model URI or run path to load the model.

  • E. Incorrect.

    Incorrect. While mlflow.register_model() allows you to register a model to the MLflow Model Registry, it does not help in directly retrieving the artifacts for deployment.

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