BestCheckpointKeeper

class BestCheckpointKeeper(result_tracker: ResultTracker, metric_selection: MetricSelection)[source]

Bases: CheckpointKeeper

Keep checkpoints for steps that achieved the best value for a metric.

Methods Summary

__call__(steps)

Iterate over the steps for which checkpoints should be kept.

Methods Documentation

Parameters:
__call__(steps: Sequence[int]) Iterator[int][source]

Iterate over the steps for which checkpoints should be kept.

Parameters:

steps (Sequence[int]) – the sorted list of steps at which checkpoints were written.

Yields:

the steps for which checkpoints should be kept

Return type:

Iterator[int]