Databricks Machine Learning Associate exam dumps

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

Select 4

You are training a machine learning model and want to manually log metrics, artifacts, and the model itself in an MLflow Run. Which of the following steps should you take to correctly achieve this?

  1. A

    Use the mlflow.start_run() context manager to initiate a run before logging metrics, artifacts, or models.

  2. B

    Log metrics like accuracy or loss using mlflow.log_metric() after the training process.

  3. C

    Log the trained model using mlflow.log_artifact().

  4. D

    Log artifacts such as training plots or files using mlflow.log_artifact().

  5. E

    End the MLflow Run explicitly using mlflow.end_run() if you are not using a context manager.

Show answer and explanation

Correct answers: A, B, D, E

Explanation

To manually log metrics, artifacts, and models in an MLflow Run, you must first initiate a run using mlflow.start_run() or explicitly call mlflow.start_run() and mlflow.end_run() if not using a context manager. Metrics can be logged with mlflow.log_metric(), artifacts can be logged with mlflow.log_artifact(), and models should be logged with dedicated model logging functions like mlflow.log_model(). Properly managing the lifecycle of an MLflow Run ensures that all logs and artifacts are correctly recorded.

  • A. Correct.

    Correct: The mlflow.start_run() context manager is required to initiate an MLflow Run. Without this, no metrics, artifacts, or models can be logged.

  • B. Correct.

    Correct: Metrics like accuracy, loss, or other evaluation metrics should be logged using mlflow.log_metric().

  • C. Incorrect.

    Incorrect: The mlflow.log_artifact() function is used to log files or artifacts, not models. To log a model, you should use mlflow.log_model().

  • D. Correct.

    Correct: Artifacts such as training plots, configuration files, or other relevant files should be logged using mlflow.log_artifact().

  • E. Correct.

    Correct: If you are not using the mlflow.start_run() context manager, you must explicitly call mlflow.end_run() to terminate the MLflow Run.

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