Courseiva
Model Development →easyMultiple Choice

Databricks-ML-Assoc Model Development Practice Question

A machine learning engineer is using MLflow to track experiments in Databricks. They want to record the hyperparameters used for each run so that they can compare runs later. Which MLflow method should they use to log a single hyperparameter?

⚠ Common exam trap

The trap here is mixing up parameters and metrics; parameters are configuration inputs, while metrics are evaluation outputs, and MLflow provides separate methods for each.

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()`

`mlflow.log_param()` is the correct method to record hyperparameters for an MLflow run. It stores key-value pairs that are displayed in the experiment UI and can be used to filter and compare runs, which is essential for hyperparameter tuning.

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.log_metric()`

    Why it's wrong here

    `mlflow.log_metric()` is used to log numeric metrics that change over time, such as accuracy or loss. It is not intended for hyperparameters, which are typically static configuration values. Using it for parameters would misrepresent the data and complicate comparison.

  • ✗

    `mlflow.set_tag()`

    Why it's wrong here

    `mlflow.set_tag()` sets a tag on the run, which is metadata not intended for hyperparameters. Tags are useful for annotations like 'baseline' or 'production', but they are not designed for numerical or categorical parameters that you want to compare systematically.

  • ✓

    `mlflow.log_param()`

    Why this is correct

    `mlflow.log_param()` logs a single key-value parameter for the current run. It is the standard method for recording hyperparameters such as learning rate or number of trees, making them searchable and comparable across runs in the MLflow experiment UI.

  • ✗

    `mlflow.log_artifact()`

    Why it's wrong here

    `mlflow.log_artifact()` logs a file or directory as an artifact associated with the run. While you could log a file containing parameters, this is not the standard way to record individual hyperparameters, and they would not be easily searchable in the MLflow UI.

About these practice questions

One of 319 original Databricks-ML-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.