Courseiva
Model Development →mediumMultiple Choice

Databricks-ML-Assoc Model Development Practice Question

A machine learning engineer is using MLflow to track a model training run on Databricks. They log a metric with mlflow.log_metric("accuracy", 0.95) and later want to retrieve it. They call mlflow.get_run(run_id) and access run.data.metrics. However, they find that the metrics dictionary is empty. What is the most likely reason?

⚠ Common exam trap

The trap here is assuming that metrics are automatically associated with the most recent run, ignoring the possibility of logging to a different run context.

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

✓

The metric was logged to a different run than the one being retrieved.

An empty metrics dictionary when retrieving a run indicates that no metrics were logged to that specific run. This commonly occurs when the metric is logged while a different run is active, or when the run_id used for retrieval does not match the run where logging occurred. Verifying the active run and run_id resolves the issue.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The metric name contained uppercase letters, which are not allowed in MLflow.

    Why it's wrong here

    MLflow allows uppercase letters in metric names. There is no restriction on case. Therefore, this would not cause the metrics dictionary to be empty. The issue is more likely related to the run context or the run_id used for retrieval. If the metric was logged successfully, it would appear regardless of case.

  • ✗

    The metric value was outside the allowed range, so MLflow silently dropped it.

    Why it's wrong here

    MLflow does not enforce a range for metric values; it accepts any numeric value. It does not silently drop metrics based on value. Therefore, this is not the reason for an empty metrics dictionary. The problem is more likely due to logging to a different run or a misconfiguration of the tracking URI.

  • ✗

    The metric was logged with a step parameter, so it is stored in run.data.metrics as a list of values.

    Why it's wrong here

    When a metric is logged with a step, MLflow stores it as a list of values with associated steps, but it still appears in run.data.metrics as a list. The dictionary would not be empty; it would contain the metric name mapped to a list of Metric objects. The scenario states the dictionary is empty, so this is not the cause.

  • ✓

    The metric was logged to a different run than the one being retrieved.

    Why this is correct

    If the metric was logged to a different run, then retrieving the current run's data would show no metrics. This can happen if the active run was not set correctly or if the logging occurred in a different context. The other options do not explain an empty metrics dictionary for the specified run. Ensuring the correct run_id is used is essential.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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.