Databricks Machine Learning Professional exam dumps

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

Select 3

You are training a machine learning model in a Databricks notebook and want to log SHAP plots, custom visualizations, and metadata for your experiment runs. Which of the following steps should you take to properly log and view these artifacts using MLflow in Databricks?

  1. A

    Use the mlflow.log_artifact() function to log SHAP plots and other custom visualizations.

  2. B

    Save the SHAP plot or visualization as a file (e.g., PNG or HTML) locally before logging it as an artifact.

  3. C

    Directly pass a Python object representing the SHAP plot to mlflow.log_artifact().

  4. D

    Use the MLflow UI in Databricks to view logged artifacts after the run is complete.

  5. E

    Enable automatic artifact logging in MLflow to log SHAP plots and custom visualizations without any additional code.

Show answer and explanation

Correct answers: A, B, D

Explanation

To log and view artifacts like SHAP plots and custom visualizations in MLflow on Databricks, you must save the visualizations as files locally and then log them using mlflow.log_artifact(). Once logged, you can view these artifacts in the MLflow UI after the experiment run. Automatic artifact logging cannot handle custom visualizations, so explicit logging is necessary.

  • A. Correct.

    Correct: The mlflow.log_artifact() function is the standard way to log artifacts such as SHAP plots, custom visualizations, or any other files in MLflow. This makes the artifacts accessible in the MLflow tracking UI.

  • B. Correct.

    Correct: Since mlflow.log_artifact() requires a file path as input, you must save the SHAP plot or visualization as a file (e.g., PNG, HTML, etc.) before logging it.

  • C. Incorrect.

    Incorrect: You cannot directly pass a Python object (e.g., a SHAP plot object) to mlflow.log_artifact(). The method requires a file path pointing to the artifact.

  • D. Correct.

    Correct: The MLflow UI in Databricks provides a convenient way to view logged artifacts after an experiment run is completed.

  • E. Incorrect.

    Incorrect: Automatic artifact logging is not supported for custom visualizations or SHAP plots. These artifacts must be explicitly logged using code.

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