Databricks Machine Learning Associate exam dumps

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

Single answer

You are training a machine learning model and want to manually log the model’s accuracy, the training data as an artifact, and the trained model itself in an MLflow Run. Which sequence of actions is the most appropriate to achieve this?

  1. A

    Start an MLflow run, use mlflow.log_metric to log the accuracy, mlflow.log_artifact to log the training data, and mlflow.sklearn.log_model to log the trained model.

  2. B

    Start an MLflow run, use mlflow.log_param to log the accuracy, mlflow.log_artifacts to log the training data, and mlflow.pyfunc.log_model to log the trained model.

  3. C

    Start an MLflow run, use mlflow.log_metric to log the accuracy, mlflow.log_artifacts to log the training data, and mlflow.log_model to log the trained model.

  4. D

    Start an MLflow run, use mlflow.log_metric to log the accuracy, mlflow.log_artifact to log the training data, and mlflow.log_params to log the trained model.

Show answer and explanation

Correct answer: A

Explanation

To manually log metrics, artifacts, and models in MLflow, you need to use the correct functions for each task. mlflow.log_metric is used for logging numerical metrics, mlflow.log_artifact is for logging single files, and mlflow.sklearn.log_model is specifically designed for logging scikit-learn models. Ensuring that each function is used appropriately is essential for effectively tracking your machine learning experiments.

  • A. Correct.

    This is the correct option. mlflow.log_metric is used to log numerical metrics like accuracy, mlflow.log_artifact is for logging a single file (e.g., the training data), and mlflow.sklearn.log_model is appropriate for logging models trained using scikit-learn.

  • B. Incorrect.

    mlflow.log_param is used for logging parameters (key-value pairs), not metrics like accuracy, making this option incorrect.

  • C. Incorrect.

    mlflow.log_artifacts is used to log multiple files or a directory, not a single file like the training data in this scenario, making this option incorrect.

  • D. Incorrect.

    mlflow.log_params is used for logging parameters (key-value pairs), not models, making this option incorrect.

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