Add overridable Trainer.get_resumed_dataloader (#50248)
* Add overridable Trainer.get_resumed_dataloader for mid-epoch resumption
Co-authored-by: Cursor <cursoragent@cursor.com>
* Strengthen get_resumed_dataloader test for stateful loaders
Replace the hook-invocation-only check with a regression that restores a
stateful loader under gradient accumulation, matches uninterrupted final
weights, and shows that double-skipping diverges.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Simplify stateful dataloader resume test
Drop the synthetic double-skip negative path; the weight match against
uninterrupted training is enough to cover the override use case.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update tests/trainer/test_trainer_checkpointing.py
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>