Databricks-ML-Pro Model Development Practice Question
A machine learning engineer is using MLflow to track experiments and wants to compare multiple runs to identify the best model. They have logged metrics such as accuracy, precision, and recall. Which MLflow feature allows them to programmatically retrieve and compare these metrics across runs for further analysis?
⚠ Common exam trap
It's easy for candidates to confuse functions that retrieve a single run or list experiments with the one that retrieves multiple runs for comparison.
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.search_runs()
mlflow.search_runs() is designed to query and retrieve run data across experiments. It returns a pandas DataFrame with metrics, parameters, and tags, enabling programmatic comparison and analysis. This is ideal for identifying the best model by sorting and filtering based on metrics like accuracy or precision.
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 a single metric value for a run. It does not retrieve or compare metrics across runs. It is a write operation, not a read operation. Using it for comparison would require logging all metrics again, which is not the intended use. It is not suitable for programmatic comparison of existing runs.
- ✓
mlflow.search_runs()
Why this is correct
mlflow.search_runs() allows you to query runs across experiments using a SQL-like filter and returns a pandas DataFrame containing metrics, parameters, and tags for all matching runs. This makes it easy to programmatically compare metrics across runs, sort them, and perform further analysis. It is the most efficient way to retrieve and compare multiple runs in MLflow.
- ✗
mlflow.list_experiments()
Why it's wrong here
mlflow.list_experiments() returns a list of experiments in the tracking server. It does not provide metrics or run details. It is useful for discovering experiments but not for comparing runs within an experiment. To compare runs, you need to retrieve run-level data, which this function does not provide. Therefore, it is not the correct choice for the scenario.
- ✗
mlflow.get_run()
Why it's wrong here
mlflow.get_run() retrieves metadata and metrics for a single run given its run ID. It does not support comparing multiple runs directly. To compare runs, you would need to call it multiple times and manually aggregate the results. While it can be part of a comparison workflow, it is not the primary feature for programmatic comparison across many runs.
About these practice questions
Courseiva writes every Databricks-ML-Pro question from scratch — 300 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-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.