espnet3.components.modeling.optimization_spec.OptimizerRuntimeState
Less than 1 minute
espnet3.components.modeling.optimization_spec.OptimizerRuntimeState
class espnet3.components.modeling.optimization_spec.OptimizerRuntimeState(accum_counter: int = 0, update_step: int = 0)
Bases: object
Track custom runtime counters for one named optimizer.
Lightning already checkpoints optimizer and scheduler state_dict() values. This dataclass exists only for extra ESPnet3 runtime state that Lightning does not manage for named multi-optimizer training:
- accum_counter: how many backward passes have been accumulated since the
last optimizer step,
- update_step: how many times this optimizer has actually been updated.
These counters are saved and restored through on_save_checkpoint() and on_load_checkpoint() in the Lightning module.
accum_counter : int = 0
update_step : int = 0
