-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Find parameters which are specified in the LightningDataModule, only #4347
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 #4347 +/- ##
=======================================
+ Coverage 90% 93% +3%
=======================================
Files 116 116
Lines 8858 8858
=======================================
+ Hits 8006 8250 +244
+ Misses 852 608 -244 |
Borda
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 addition with softy trainer get
| attr = getattr(trainer.datamodule, attribute) | ||
| else: | ||
| attr = False | ||
| if not attr and trainer is not None: |
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.
what if the Trainer does not have trainer.datamodule?
UPDATE: I found the assignment in data connector, but missing in Trainer __init__
cc: @tchaton
|
thanks for the fix, don't forget to update the changelog :) |
Co-authored-by: Adrian Wälchli <[email protected]>
SkafteNicki
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.
LGTM
…4347) * search for attribute in datamodule if not found elsewhere * add test for datamodule * add lightning_getattr test for datamodule * Apply suggestions from code review Co-authored-by: Adrian Wälchli <[email protected]> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Rohit Gupta <[email protected]> (cherry picked from commit 343d19f)
…4347) * search for attribute in datamodule if not found elsewhere * add test for datamodule * add lightning_getattr test for datamodule * Apply suggestions from code review Co-authored-by: Adrian Wälchli <[email protected]> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Rohit Gupta <[email protected]> (cherry picked from commit 343d19f)
…4347) * search for attribute in datamodule if not found elsewhere * add test for datamodule * add lightning_getattr test for datamodule * Apply suggestions from code review Co-authored-by: Adrian Wälchli <[email protected]> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Rohit Gupta <[email protected]> (cherry picked from commit 343d19f)
…4347) * search for attribute in datamodule if not found elsewhere * add test for datamodule * add lightning_getattr test for datamodule * Apply suggestions from code review Co-authored-by: Adrian Wälchli <[email protected]> * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Nicki Skafte <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Rohit Gupta <[email protected]>
What does this PR do?
Fixes #4226
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃