Databricks Machine Learning Professional exam dumps

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

Select 3

You are tasked with training a machine learning model to predict house prices and need to log the model, its parameters, and evaluation metrics manually using MLflow. Which of the following steps should you take to ensure all relevant information is logged correctly?

  1. A

    Use the mlflow.log_param() method to log the learning rate and batch size used during training.

  2. B

    Use the mlflow.log_metric() method to log the model's mean absolute error (MAE) after evaluation.

  3. C

    Use the mlflow.log_model() method to log the trained model artifact.

  4. D

    Use the mlflow.log_artifact() method to log the training dataset as an artifact.

  5. E

    Use the mlflow.set_experiment() method to automatically log metrics and parameters during training.

Show answer and explanation

Correct answers: A, B, C

Explanation

To manually log parameters, models, and evaluation metrics using MLflow, you must explicitly call methods such as mlflow.log_param(), mlflow.log_metric(), and mlflow.log_model(). These methods ensure reproducibility and traceability of your machine learning workflow. Logging artifacts such as datasets is optional and not necessary in this scenario. Additionally, setting an experiment with mlflow.set_experiment() is unrelated to manual logging.

  • A. Correct.

    Correct. The mlflow.log_param() method is used to manually log hyperparameters such as the learning rate and batch size, which are essential for reproducibility.

  • B. Correct.

    Correct. The mlflow.log_metric() method is used to log evaluation metrics like MAE or accuracy, which are crucial for tracking model performance.

  • C. Correct.

    Correct. The mlflow.log_model() method is used to log the trained model artifact, ensuring the model can be loaded and reused later.

  • D. Incorrect.

    Incorrect. While mlflow.log_artifact() can be used to log additional files, logging the training dataset is not a standard practice for model tracking and is not required in this scenario.

  • E. Incorrect.

    Incorrect. mlflow.set_experiment() is used to set the active experiment, but it does not automatically log parameters or metrics. Manual logging requires explicit calls to log_param() and log_metric().

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