Skip to content
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

IterableDataset does not work in validation #1731

Closed
cmpatino opened this issue May 4, 2020 · 2 comments · Fixed by #1560
Closed

IterableDataset does not work in validation #1731

cmpatino opened this issue May 4, 2020 · 2 comments · Fixed by #1560

Comments

@cmpatino
Copy link

cmpatino commented May 4, 2020

🐛 Bug

Colab to Reproduce: https://colab.research.google.com/drive/1YEdFCv0_VkdOG9FVibPzGAOv3tH-vpki

Validation datasets cannot use IterableDatsets because Lightning still needs the __len__ method of the validation dataset. I tracked the __len__ call to the line I reference below.

https://github.com/PyTorchLightning/pytorch-lightning/blob/48e808c20e55fae47fc58b3e2c4e2056883b88b4/pytorch_lightning/trainer/data_loading.py#L222

Particularly, the if dl statement implicitly calls the __len__ function of the dataset.

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2020

Hi! thanks for your contribution!, great first issue!

@awaelchli
Copy link
Contributor

A fix is in the works in PR #1560

@awaelchli awaelchli linked a pull request May 5, 2020 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants