Home / ML Associate practice test / Databricks Machine Learning / Question

Databricks Machine Learning Associate · free practice question

During a custom evaluation job, an engineer saves a confusion-matrix image to a local path and wants it attached to the current MLflow run together with the…

Exam-style question on Databricks Machine Learning from the free ML Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Databricks Machine Learning

During a custom evaluation job, an engineer saves a confusion-matrix image to a local path and wants it attached to the current MLflow run together with the trained sklearn model. What should she do?

  1. AWithin the active run, copy the image to a Unity Catalog volume and log its path as a param, as files written to local disk in the session are not accepted as run artifacts
  2. BWithin the active run, log metrics and params with MLflow and upload the image through Catalog Explorer, as the run UI does not retain arbitrary files beside a logged model
  3. CRegister the sklearn model first and share the image with the team by email, as model registration closes the active run and blocks further artifact uploads to it
  4. DWithin the active run, call mlflow.log_artifact with the saved image path and log the trained model with the sklearn MLflow flavor, placing both under the same run
  5. EWithin the active run, store the confusion matrix as a run tag value and serialize the model as JSON text, as the tracking server does not accept binary files
Answer & explanation

Correct answer: D

WHY D: mlflow.log_artifact attaches local files such as images to the active run, and MLflow model flavors are used to log trained models in the same run, so both appear in the run metadata and artifacts.

WHY NOT A: Local files can be logged as artifacts, including ones generated in the same notebook session.

WHY NOT B: Arbitrary artifacts are supported and are displayed and retained alongside a logged model.

WHY NOT C: Logging artifacts and models can happen within the run workflow; registration does not close the run.

WHY NOT E: Tags are not a substitute for binary artifacts or model logging.

Take the full ML Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Machine Learning Associate practice test. Take it and get a section-by-section score.

Start the free test →