Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 102 of 656

Databricks Certified Machine Learning Associate. Associate level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Associate Question 102

Select 4

You are training a machine learning model using Databricks and want to use MLflow to manually track your experiment's performance. Which of the following steps should you take to log metrics, artifacts, and the trained model within an MLflow run?

  1. A

    Use mlflow.start_run() to initiate a run and log metrics using mlflow.log_metric().

  2. B

    Use mlflow.log_param() to log hyperparameters used in the training process.

  3. C

    Save the trained model locally and manually upload it to the MLflow tracking server.

  4. D

    Log artifacts such as confusion matrices or feature importance plots using mlflow.log_artifacts().

  5. E

    Log the model using mlflow.log_model() to save it with the run for reproducibility.

Show answer and explanation

Correct answers: A, B, D, E

Explanation

To manually log metrics, parameters, artifacts, and models in MLflow, you must first start a run using mlflow.start_run(). Metrics are logged using mlflow.log_metric(), parameters with mlflow.log_param(), and artifacts with mlflow.log_artifacts(). The model should be logged using mlflow.log_model() to ensure it is associated with the run and available for later use. Saving the model locally without logging it with MLflow does not meet the requirement for manual tracking in MLflow.

  • A. Correct.

    Correct: mlflow.start_run() initializes an MLflow run, and mlflow.log_metric() is used to log metrics such as accuracy or loss.

  • B. Correct.

    Correct: mlflow.log_param() is used to record hyperparameters, such as learning rates or batch sizes, which are crucial for experiment tracking.

  • C. Incorrect.

    Incorrect: While you can save the model locally, it must be logged into MLflow using mlflow.log_model() to properly associate it with the run.

  • D. Correct.

    Correct: mlflow.log_artifacts() is used to log artifacts like plots or datasets, which are valuable for model evaluation and debugging.

  • E. Correct.

    Correct: mlflow.log_model() allows you to log and save the trained model with the MLflow run, enabling versioning and deployment capabilities.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

48 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam