Sub topic 5
Comparing Runs and Sharing Results with a Team
Assume you know Python, can run a training script, and understand hyperparameters, validation splits, and evaluation metrics. This chapter focuses on using tracker interfaces to compare runs and communicate a decision. It does not cover how to start a run or store large model files.
What a useful comparison contains
A run is one execution of a training or evaluation job. A comparison is meaningful only when the runs use compatible data and metric definitions.
Compare these fields together:
- Parameters, such as learning rate, batch size, and model depth.
- Metrics, such as validation loss, accuracy, or area under the ROC curve.
- Metric history, which shows how a value changed by epoch or step.
- Tags, which describe context such as the code version, data version, owner, or purpose.
- Run status, including success, failure, or cancellation.
- Notes, which explain unusual results or follow-up work.
A final metric alone can hide useful information. Two runs might both reach a validation AUC of 0.91, but one may reach it early and remain stable while the other oscillates or overfits.
A comparison workflow
Use the same sequence for MLflow, Weights & Biases, or another tracker:
- Select runs from the same experiment or project.
- Filter by a shared data version, code version, or model family.
- Sort by a primary metric.
- Inspect parameter differences between strong and weak runs.
- Open metric charts to compare learning curves.
- Check tags and notes before drawing a conclusion.
- Record the selected run and the reason for selecting it.
The tracker should help the team answer a specific question. For example, “Does increasing tree depth improve validation AUC on data version 2026-11-01?” is better than “Which run looks best?”
Querying runs programmatically
A dashboard is useful for exploration, but code makes a comparison repeatable. This MLflow example finds the best runs for one experiment and prints their parameters and metrics.
from mlflow import MlflowClient
client = MlflowClient(tracking_uri="http://127.0.0.1:5000")
experiment = client.get_experiment_by_name("churn-model")
if experiment is None:
raise RuntimeError("Experiment 'churn-model' does not exist")
runs = client.search_runs(
experiment_ids=[experiment.experiment_id],
filter_string="tags.data_version = '2026-11-01'",
order_by=["metrics.val_auc DESC"],
max_results=10,
)
for run in runs:
print(
run.info.run_id,
run.info.run_name,
run.data.params.get("max_depth"),
run.data.params.get("learning_rate"),
run.data.metrics.get("val_auc"),
)The filter prevents a newer or older dataset from entering the comparison. The sort order puts the highest recorded val_auc first. Before using this result to choose a model, verify whether the metric represents the final step or the best validation step. Track that distinction with a tag or a separate metric when it matters.
Sharing results with a team
MLflow commonly shares results through a team-hosted tracking server and its web interface. Weights & Biases commonly shares results through projects, dashboards, reports, and workspace permissions in its hosted service. Both can show run tables and metric charts, but the surrounding collaboration workflow differs by deployment and plan.
A good team comparison has:
- A saved filter or report that others can reopen.
- A clear primary metric and an explanation of whether higher or lower is better.
- A fixed evaluation dataset or data version.
- Links or identifiers for the code revision and selected run.
- Notes about failed runs, excluded runs, and known limitations.
- A decision record, such as “Run 8 selected because it improved recall without exceeding the latency limit.”
Common comparison errors
A team can reach the wrong conclusion even when every run was logged successfully.
- Mixed data versions: A score increase may come from changed labels or sampling.
- Mixed metric definitions: “Accuracy” can mean micro-average, macro-average, or a threshold-specific value.
- Unequal evaluation budgets: One run may train for 100 epochs while another trains for 20.
- Hidden filtering: A dashboard filter can omit failed or earlier runs.
- Overfitting to one metric: A higher AUC may come with worse calibration, latency, or fairness.
- Unclear best step: The chart may show the best point while the exported model came from the final point.
Treat the tracker as a shared investigation record. The interface supports the discussion, but the team still needs explicit comparison rules.
Exercise
You have two runs with the same validation AUC. Run A uses data version 12 and has stable validation loss. Run B uses data version 13 and has a lower training loss. Which run should enter the first team review, and why?
Show answer
Run A should enter the first review because it is comparable to runs using data version 12 and has stable validation behavior. Run B may be promising, but its changed data version and lower training loss do not establish better generalization.