-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Separate the Gradient Accumulation Scheduler from Trainer #16729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into removal/accumulation-scheduler
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflow
These checks are required after the changes to 🟢 pytorch_lightning: Azure GPU
These checks are required after the changes to 🟢 pytorch_lightning: Azure HPU
These checks are required after the changes to 🟢 pytorch_lightning: Azure IPU
These checks are required after the changes to 🟢 pytorch_lightning: Docs
These checks are required after the changes to 🟢 mypy
These checks are required after the changes to 🟢 installThese checks are required after the changes to 🟢 link-check
These checks are required after the changes to Thank you for your contribution! 💜
|
for more information, see https://pre-commit.ci
Co-authored-by: Carlos Mocholí <[email protected]>
…into removal/accumulation-scheduler
for more information, see https://pre-commit.ci
What does this PR do?
Removes support for passing a scheduling dictionary to
Trainer(accumulate_grad_batches=...)
. The same functionality can still be achieved by simply passing the callback in. This simplifies the Trainer and the overall validation logic. Furthermore, it makes the callback self-contained and leaves open the possibility to move it out of the lightning package (not decided).Before:
Now:
This refactor and breaking change to the Trainer API is part of the Trainer 2.0 simplification effort.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
I made sure I had fun coding 🙃
cc @justusschock @awaelchli @Borda