Courseiva
Model Development →easyMultiple Choice

Databricks-ML-Assoc Model Development Practice Question

A data scientist is training a linear regression model using scikit-learn on Databricks. They want to track the model's hyperparameters, such as fit_intercept and normalize, in MLflow. Which MLflow API call should they use to log these hyperparameters?

⚠ Common exam trap

The trap here is assuming that any logging function can record hyperparameters; only log_param is designed for that purpose.

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

To track hyperparameters in MLflow, the appropriate API is mlflow.log_param, which records key-value pairs that define the model's configuration. This allows the parameters to be visible in the MLflow UI and searchable via the API. Logging metrics, artifacts, or tags would not correctly capture hyperparameters and would hinder experiment comparison.

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

    Why it's wrong here

    mlflow.log_artifact logs a file or directory as an artifact associated with a run. While you could serialize hyperparameters to a file and log it, this is not the intended use. It would not allow easy querying or comparison of hyperparameters in the MLflow UI, and it adds unnecessary complexity.

  • ✓

    mlflow.log_param

    Why this is correct

    mlflow.log_param logs a single key-value pair representing a hyperparameter. It is the correct API for recording settings like fit_intercept and normalize. Each call logs one parameter, and parameters are immutable once logged for a run, ensuring a clear record of the configuration used for that training run.

  • ✗

    mlflow.log_metric

    Why it's wrong here

    mlflow.log_metric records numeric metrics such as accuracy or loss, which are typically evaluated during or after training. Hyperparameters like fit_intercept are not performance metrics; they are configuration settings. Using log_metric would misrepresent the data and make it harder to filter runs by hyperparameter values.

  • ✗

    mlflow.set_tag

    Why it's wrong here

    mlflow.set_tag sets a tag on a run, which is metadata for categorization and search. Tags are not designed for hyperparameters because they are not typed and are not displayed in the parameters section of the UI. Using tags for hyperparameters would make it harder to systematically compare runs based on parameter values.

About these practice questions

This Databricks-ML-Assoc question is part of Courseiva's 319-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.