-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Remove optimizer_idx
from toggle/untoggle_optimizer
methods
#16560
Conversation
optimizer_idx
from LightningModule.toggle/untoggle_optimizer
optimizer_idx
from toggle/untoggle_optimizer
methods
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflowThese 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! 💜
|
Co-authored-by: Carlos Mocholí <[email protected]>
What does this PR do?
Part of #16539
Since #16539 removes the concept of optimizer index, and toggle/untoggle methods will be useful for working with multiple optimizers in manual optimization, this PR makes it more convenient to use these methods by taking the optimizer object directly instead of the index.
Does your PR introduce any breaking changes? If yes, please list them.
Argument optimizer_idx gets removed from both methods. Part of the Trainer 2.0 loop simplification initiative.
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 @Borda @justusschock @carmocca @awaelchli