ExplicitCheckpointKeeper

class ExplicitCheckpointKeeper(keep: Collection[int])[source]

Bases: CheckpointKeeper

Keep checkpoints at explicit steps.

Methods Summary

__call__(steps)

Iterate over the steps for which checkpoints should be kept.

Methods Documentation

Parameters:

keep (Collection[int])

__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]