-
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
Update setup logic in training type plugins [1 / n] #9994
Conversation
Co-authored-by: Carlos Mocholí <[email protected]>
…up' into lightning-lite/refactors/ttp-setup
pytorch_lightning/plugins/training_type/training_type_plugin.py
Outdated
Show resolved
Hide resolved
pytorch_lightning/plugins/training_type/training_type_plugin.py
Outdated
Show resolved
Hide resolved
pytorch_lightning/plugins/training_type/training_type_plugin.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do resonate with @four4fish, if we'd like to get this in before our release, we should try to comment/todo the introduced function which should be refactored once the precision plugin is moved into the TTP (I think out of scope for 1.5)
@SeanNaren @four4fish Thanks for the suggestions! Added docs and TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 1
pytorch_lightning/plugins/training_type/training_type_plugin.py
Outdated
Show resolved
Hide resolved
937e32b
to
6a13cf7
Compare
for more information, see https://pre-commit.ci
While currently the methods are primarily used by Lite, they will become more important ingredients later on for all Lightning and all plugins
for more information, see https://pre-commit.ci
@awaelchli @tchaton @SeanNaren Thank you for the explanations! |
What does this PR do?
Part of #9987
Adds methods for plugins to override how models and optimizers are setup.
The follow up PR(s) will add implementations for setup to DP, TPUSpawn, Deepspeed, etc.
Does your PR introduce any breaking changes? If yes, please list them.
No.
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 🙃
Make sure you had fun coding 🙃