Skip to content

Conversation

@maxjeblick
Copy link
Contributor

@maxjeblick maxjeblick commented Oct 25, 2020

What does this PR do?

Fixes #4226

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

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 🙃

@codecov
Copy link

codecov bot commented Oct 25, 2020

Codecov Report

Merging #4347 (ae776ab) into master (470e294) will increase coverage by 3%.
The diff coverage is 80%.

@@           Coverage Diff           @@
##           master   #4347    +/-   ##
=======================================
+ Coverage      90%     93%    +3%     
=======================================
  Files         116     116            
  Lines        8858    8858            
=======================================
+ Hits         8006    8250   +244     
+ Misses        852     608   -244     

Copy link
Collaborator

@Borda Borda left a 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:
Copy link
Collaborator

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

@Borda Borda added bug Something isn't working feature Is an improvement or enhancement labels Nov 5, 2020
@Borda Borda added this to the 1.0.x milestone Nov 5, 2020
@awaelchli
Copy link
Contributor

awaelchli commented Nov 5, 2020

thanks for the fix, don't forget to update the changelog :)
@maxjeblick did you verify that the new test fails on master?

@awaelchli awaelchli mentioned this pull request Nov 5, 2020
17 tasks
Copy link
Collaborator

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SkafteNicki SkafteNicki added the ready PRs ready to be merged label Nov 9, 2020
@SkafteNicki SkafteNicki merged commit 343d19f into Lightning-AI:master Nov 10, 2020
SeanNaren pushed a commit that referenced this pull request Nov 10, 2020
…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)
@edenlightning edenlightning removed the feature Is an improvement or enhancement label Nov 10, 2020
SeanNaren pushed a commit that referenced this pull request Nov 11, 2020
…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)
Borda added a commit that referenced this pull request Nov 11, 2020
…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)
rohitgr7 added a commit that referenced this pull request Nov 21, 2020
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch size finder is not working if batch_size is specified in LightningDataModule

7 participants