SIGN IN SIGN UP

Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.

30975 0 0 Python

LRs updates are called at the end of a skipped epoch (#21307)

* fix: Update lr if train_batch_start returns -1

* fix: Rename variable: should_skip_rest_of_epoch

* chore: Update changelog

* fix: Batch increment

* Apply suggestion from @SkafteNicki

* test: Check lr is updated at the end of epoch

When `on_train_batch_start` returns -1, the rest of the epoch is skipped.
The lr update should still happen at the end of the epoch.
- Test is_last_batch has been set correctly
- Test lr has been updated at the end of each epoch

* doc: Add documentation for lr update

---------

Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
L
Lucas Meyer committed
f7692a64a53e5c0ef339657e8e458284c3f13b2b
Parent: 8f1c1ac
Committed by GitHub <[email protected]> on 11/19/2025, 3:55:44 PM