-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix tuner.scale_batch_size not finding batch size attribute when using datamodule #5968
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
Codecov Report
@@ Coverage Diff @@
## master #5968 +/- ##
=======================================
- Coverage 94% 91% -3%
=======================================
Files 161 161
Lines 11474 11368 -106
=======================================
- Hits 10731 10339 -392
- Misses 743 1029 +286 |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
|
@awaelchli any plans to get this in? |
|
Yes I try to get it done by the end of this week. |
carmocca
left a comment
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.
Mildly related, why do we have this loop?
legacy stuff, pre- accelerator refactor this model connector class will be refactored-away. |
rohitgr7
left a comment
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.
we have few tests related to tuner here: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/tests/trainer/test_trainer_tricks.py
These should be added to tests/tuner too.
Else LGTM ✌️
tchaton
left a comment
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.
Nice fix !
What does this PR do?
Fixes #5967
The tuner tries to detect if the model has an attribute for batch size, however before the trainer attaches the datamodule.
Hence the batch size attribute can't be found.
The newly added test fails on master.
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?
Make sure you had fun coding 🙃