fix: save checkpoints after optimizer steps
- add a post-step callback hook for checkpoint saves - preserve updated model, optimizer, and scheduler state - cover checkpoint ordering with a regression test
This commit is contained in:
@@ -101,6 +101,8 @@ class Trainer:
|
||||
if context.scheduler:
|
||||
context.scheduler.step()
|
||||
|
||||
self._call_callbacks("on_after_optimizer_step", context)
|
||||
|
||||
self._call_callbacks("on_epoch_end", context)
|
||||
|
||||
if context.stop_requested:
|
||||
|
||||
Reference in New Issue
Block a user