Courseiva
Model Development →easyMultiple Choice

Databricks-ML-Pro Model Development Practice Question

A data scientist is using MLflow to track experiments on Databricks. They want to record the value of a hyperparameter named 'learning_rate' for a run. Which MLflow function should they use?

⚠ Common exam trap

A common mix-up: candidates confuse metrics with parameters, since both accept numeric values, but only parameters are intended for hyperparameters.

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("learning_rate", 0.01)

mlflow.log_param() is specifically designed to log hyperparameters as key-value pairs. It enables filtering and comparison of runs based on parameter values in the MLflow UI. The other functions log metrics, tags, or artifacts, which are not suitable for hyperparameters. Using the correct function ensures that the 'learning_rate' is properly recorded and can be used for experiment analysis.

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_artifact("learning_rate", 0.01)

    Why it's wrong here

    mlflow.log_artifact() is used to log files or directories as artifacts, not key-value pairs. It cannot record a hyperparameter value directly. Attempting to log a hyperparameter as an artifact would be incorrect and would not integrate with MLflow's parameter comparison features. The correct function for logging a hyperparameter is mlflow.log_param().

  • ✗

    mlflow.log_metric("learning_rate", 0.01)

    Why it's wrong here

    mlflow.log_metric() is used to log numeric metrics that can change over time, such as loss or accuracy. While it can store a numeric value, it is semantically intended for metrics, not hyperparameters. Using it for a hyperparameter would misrepresent the data and make it harder to filter and compare runs by parameters in the MLflow UI. The correct function for parameters is mlflow.log_param().

  • ✗

    mlflow.set_tag("learning_rate", 0.01)

    Why it's wrong here

    mlflow.set_tag() logs metadata as a string key-value pair. Tags are not designed for hyperparameters and do not support numeric comparison or filtering in the same way as parameters. Using tags for hyperparameters would lose type information and make systematic hyperparameter tuning analysis difficult. The appropriate function for hyperparameters is mlflow.log_param().

  • ✓

    mlflow.log_param("learning_rate", 0.01)

    Why this is correct

    mlflow.log_param() is the correct function to log a single hyperparameter as a key-value pair. It records the parameter under the current run, making it available for comparison in the MLflow UI. This directly satisfies the requirement to record the 'learning_rate' hyperparameter. Other functions log metrics, artifacts, or tags, not parameters.

About these practice questions

One of 300 original Databricks-ML-Pro 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-Pro 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-Pro exam.