Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 104 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 104

Select 4

You are training a machine learning model using Databricks and want to manually log the model's metrics, artifacts, and the final model to MLflow. Which of the following actions must you take to ensure proper logging within an MLflow Run?

  1. A

    Start an MLflow run using mlflow.start_run() before logging metrics, artifacts, or models.

  2. B

    Use mlflow.log_metric() to log key performance metrics such as accuracy or loss.

  3. C

    Call mlflow.end_run() immediately after logging metrics to ensure they are saved.

  4. D

    Use mlflow.log_artifact() to log files such as plots, datasets, or model-related files.

  5. E

    Call mlflow.log_model() to log the trained machine learning model into MLflow.

Show answer and explanation

Correct answers: A, B, D, E

Explanation

To manually log metrics, artifacts, and models in an MLflow Run, you need to start an MLflow run using mlflow.start_run(), then log metrics, artifacts, and models using the appropriate MLflow logging functions. Calling mlflow.end_run() is not required immediately after any logging operation, it can be invoked after all logging is complete. Each logging function serves a specific purpose: metrics for performance tracking, artifacts for file storage, and models for saving the trained model.

  • A. Correct.

    This is correct. An MLflow run must be started using mlflow.start_run() to create a context for logging metrics, artifacts, and models.

  • B. Correct.

    This is correct. The mlflow.log_metric() function is used to log metrics like accuracy or loss during an MLflow run.

  • C. Incorrect.

    This is incorrect. Calling mlflow.end_run() is optional and can be done after all logging is complete. You do not need to call it immediately after logging metrics.

  • D. Correct.

    This is correct. The mlflow.log_artifact() function allows you to log files such as plots, datasets, or model-related files during an MLflow run.

  • E. Correct.

    This is correct. The mlflow.log_model() function is used to save the trained machine learning model to MLflow for reproducibility and deployment.

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