-
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
fixed extra dataloader bug #1196
Merged
Borda
merged 14 commits into
Lightning-AI:master
from
TevenLeScao:extra_dataloader_bug-fix
Apr 2, 2020
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0b6832f
fixed extra dataloader bug
TevenLeScao c805f94
Update pytorch_lightning/trainer/training_loop.py
TevenLeScao 02349a9
updated CHANGELOG
TevenLeScao 79b1b3a
Merge remote-tracking branch 'origin/extra_dataloader_bug-fix' into e…
TevenLeScao d8241a8
Small non-repetition change
TevenLeScao 6b41ed2
Update CHANGELOG.md
Borda 9a45c12
Merge branch 'master' into extra_dataloader_bug-fix
TevenLeScao 00f3689
changed argument name to reload_train_dataloader_every_epoch
TevenLeScao 76ed916
Merge remote-tracking branch 'origin/extra_dataloader_bug-fix' into e…
TevenLeScao f52d30a
fixed doc underline too short
TevenLeScao 8304bcc
Merge branch 'master' into extra_dataloader_bug-fix
TevenLeScao 899ab4f
reverted to `reload_dataloaders_every_epoch`
TevenLeScao 53d3b14
fixed val and test reloading
TevenLeScao 4b5e599
fixed val and test reloading
TevenLeScao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this is wrong no? don’t we want to reset the test and val dataloaders with every call to evaluate?
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.
Edit: I'm not sure what
evaluation_loop
is used for; why would we want to reload the test and/or val dataloader when it is called ? It doesn't strike me as an "every epoch" kind of thing.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.
If we want to keep that, maybe the compromise is to keep the name
reload_dataloaders_every_epoch
, and consider that this reloads the train dataloader every training epoch intraining_loop
, and the val/test dataloaders at every evaluation inevaluation_loop
. This would fix the initial bug and keep all functionality the same and I feel like that should be the main objective here. I can just revert the last changes in this case, and the previously-approved PR should be good to go. Sorry if I'm reinventing the wheel here !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 thought the point was just that the reload_train_dataloader_every_epoch was doing stuff with test and val when it wasn't needed - not to revert the change?
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'm actually not sure anymore ! At least here I understand that @williamFalcon wants to reset them and @ethanwharris you want to call it
reload_train_dataloader_every_epoch
and not reset them.But in any case I think it's better to have
reload_dataloaders_every_epoch
stand for everything, as it keeps previous functionality and doesn't split it into an argument for everything (ie train val and test)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.
evaluate runs the test and val loop.
Maybe i'm missing something, but if the user wants to reload the validation and test datasets every time evaluation is checked that should be allowed no?
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.
Haha, I'm confused. Originally tbe point was made that
reload_dataloaders_every_epoch
didn't previously reload the test and val dataloaders, only train. So then I suggested the name change, but it turns out we do reload them? Anyway, let's make it so thatreload_dataloaders_every_epoch
does what it says on the tin and applies to val and test aswell, in which case I think the above comment from @tullie still applies. Can then revisit it if someone finds a use case where that doesn't work for them :)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.
@ethanwharris is this also solved?
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.
It should be fixed now, but the CI says some checks were cancelled and I'm not sure why :/
Edit: seems fine second time around