syne_tune.optimizer.schedulers.remove_checkpoints module
- class syne_tune.optimizer.schedulers.remove_checkpoints.RemoveCheckpointsSchedulerMixin[source]
Bases:
object
Methods to be implemented by pause-and-resume schedulers (in that
on_trial_result()
can returnSchedulerDecision.PAUSE
) which support early removal of checkpoints. Typically, model checkpoints are retained for paused trials, because they may get resumed later on. This can lead to the disk filling up, so removing checkpoints which are no longer needed, can be important.Early checkpoint removal is implemented as a callback used with
Tuner
, which is created bycallback_for_checkpoint_removal()
here.- callback_for_checkpoint_removal(stop_criterion)[source]
- Parameters:
stop_criterion (
Callable
[[TuningStatus
],bool
]) – Stopping criterion, as passed toTuner
- Return type:
Optional
[TunerCallback
]- Returns:
CP removal callback, or
None
if CP removal is not activated