-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Batched iterative dataloading disables validation #2429
Comments
Same behavior with |
I can reproduce. |
trying to fix his right now. another observation: only happens with iterable dataset. |
@awaelchli thanks for looking into this! If I remember correctly, then for |
I think the issue is that your dataset is of type Iterable but has if I remove the len from the dataset definition, your code sample works. |
@Uroc327 fyi, it turned out there is no bug, but rather a technical thing with iterable datasets. We deciced to add a warning message when IterableDataset defines also length. In your case you have the following options:
|
@awaelchli Ok, thanks! I'll remove the |
Yep! However as the docs say in the note at the bottom of your link the user has to to their own batching to avoid duplicate data. That's why I added the warning to PL. |
Makes sense, thank you 😄 |
🐛 Bug
Setting the
batch_size
parameter fortorch.utils.data.DataLoader
to a number greater than 1, preventsvalidation_step
andvalidation_epoch_end
from being called.To Reproduce
Steps to reproduce the behavior:
python main.py
withbs = 1
validation_step
python main.py
after changing tobs = 2
Code sample
Expected behavior
Environment
Additional context
Basically a reopen of #2351, as this issue is not fixed by changing batch size and dataset size.
The text was updated successfully, but these errors were encountered: