Databricks-ML-Assoc Databricks Machine Learning Practice Question
A machine learning engineer is using MLflow on Databricks to track an experiment. They want to record the model's hyperparameters and evaluation metrics, but they do not want to save the trained model artifact. Which MLflow API calls should they use?
⚠ Common exam trap
The trap here is assuming that any MLflow logging function will automatically save the model, or that model artifacts are saved by default when logging metrics.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
mlflow.log_param() and mlflow.log_metric()
The scenario requires logging hyperparameters and metrics without saving model artifacts. MLflow provides dedicated functions for this: log_param for individual parameters and log_metric for metrics. These write to the tracking server and do not create artifacts. Other functions either create artifacts or manage run lifecycle, neither of which meets the specific requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
mlflow.start_run() and mlflow.end_run()
Why it's wrong here
mlflow.start_run() and mlflow.end_run() delimit a run but do not log any data by themselves. They are necessary to create a run context, but without additional logging calls, no parameters or metrics are recorded. They do not satisfy the need to capture hyperparameters and metrics, and they do not prevent artifact saving if other calls are used.
- ✗
mlflow.log_artifact() and mlflow.log_model()
Why it's wrong here
mlflow.log_artifact() saves an arbitrary file as an artifact, while mlflow.log_model() persists a model in MLflow format. Both operations create artifacts in the run's artifact store, which directly contradicts the requirement to avoid saving model artifacts. They are used when you need to store files or models, not for lightweight metadata logging.
- ✗
mlflow.set_tag() and mlflow.set_experiment()
Why it's wrong here
mlflow.set_tag() adds a tag to a run, and mlflow.set_experiment() sets the active experiment for subsequent runs. Neither function logs hyperparameters or metrics; tags are metadata for organization, and set_experiment only changes the default experiment context. They are useful for categorization but do not record the numeric values required for model evaluation.
- ✓
mlflow.log_param() and mlflow.log_metric()
Why this is correct
mlflow.log_param() records a single hyperparameter key-value pair for the current run, and mlflow.log_metric() records a numeric evaluation metric. These calls fulfill the requirement without saving any model artifact, as they only write metadata to the tracking server. They are the standard MLflow APIs for logging parameters and metrics independently of model serialization.
About these practice questions
Courseiva writes every Databricks-ML-Assoc question from scratch — 319 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-ML-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-ML-Assoc exam.