﻿# MLflow metric summaries: the latest stored value is not the best checkpoint score

Interpret MLflow run metric summaries using step and timestamp semantics, retrieving history explicitly when selecting checkpoints or comparing learning curves.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-mlflow-metric-summary-step-history/
Language: en

## Distinguish the visible summary from the selection goal

A training comparison sorts MLflow runs by their summarized validation loss and calls the top run the best checkpoint. The [client get_run documentation](https://mlflow.org/docs/latest/api_reference/python_api/mlflow.client.html) describes a metric summary selected at the largest step with the relevant latest logged value. That is not a minimum-loss calculation. Decide whether the comparison concerns the final evaluation, the best recorded evaluation or a checkpoint satisfying another deployment constraint before using a summary column to select a model.

## Define what the metric step counts

The [metric logging API](https://mlflow.org/docs/latest/api_reference/python_api/mlflow.html) separates step from timestamp. State whether the step means optimizer updates, evaluation rounds or another explicit progress unit. A batch counter and an optimizer-update counter can advance differently when gradient accumulation is used. Do not compare curves merely because they share a metric name. Their horizontal axes must describe comparable work, and the evaluation population and reduction rule must be compatible as well.

## Retrieve history for history-dependent questions

The [REST metric-history interface](https://mlflow.org/docs/latest/api_reference/rest-api.html) provides logged values for a metric key and run. Use the history when a decision depends on an earlier evaluation, and follow pagination where the chosen request uses it. Reconstruct the intended sequence from stored fields rather than treating response enumeration as an undocumented ordering guarantee. A final run summary cannot explain which earlier checkpoint produced a favorable value or whether later evaluations reversed the apparent improvement.

## Link each eligible score to its artifact

A metric value is useful for checkpoint selection when it can be associated with the actual saved model state. Preserve that association at evaluation time. A lowest historical loss without a retained checkpoint is not automatically a deployable model candidate. If several metrics constrain selection, write the rule explicitly, including tie handling and missing evaluations, instead of independently taking favorable numbers from different steps and presenting them as one model's combined result.

## Verify the rule on a deliberately nonmonotonic curve

Use a small history whose final value differs from its best value, with identifiable checkpoint artifacts and a repeated-step case. Confirm that the report selects the intended candidate. The guides on [variable-length loss reduction](/journal/variable-length-loss-reduction/) and [checkpoint data-position replay](/journal/data-guide-mosaic-mds-shard-replay/) provide related context. A reliable comparison names its metric population, progress axis and artifact-selection rule. The tracking interface records evidence; it does not define the model-selection policy on the experimenter's behalf.
