You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When returning a CombinedLoader with a dictionary in a predict_dataloader throws AttributeError: 'CombinedLoader' object has no attribute 'batch_sampler'
predict_dataloader should behave the same as test_dataloader where this behavior doesn't happen in order to be consistent between dataloaders
The issue here boils down to us having to ensemble a batch sampler for a combined dataloader (holding dataloaders of which a subset have batch samplers). This issue occurs mainly because in the prediction we require a batch sampler to keep track of the indices of each sample.
I am not convinced that this would be the way to go. I talked to @awaelchli yesterday about different ways to make this possible. A hotfix would be to make the attribute access optional.
For a longterm solution we probably need to revisit the loader itself, but we should not drop support I think
🐛 Bug
When returning a CombinedLoader with a dictionary in a
predict_dataloader
throwsAttributeError: 'CombinedLoader' object has no attribute 'batch_sampler'
predict_dataloader
should behave the same astest_dataloader
where this behavior doesn't happen in order to be consistent between dataloadersTo Reproduce
Please check colab link : https://colab.research.google.com/drive/1EUc_SoomMTNw148xo4Szvozh4tJwkWC1?usp=sharing
Expected behavior
predict_dataloader
should behave the same astest_dataloader
where this behavior doesn't happen in order to be consistent between dataloadersEnvironment
- GPU:
- Tesla P100-PCIE-16GB
- available: True
- version: 11.1* Packages:
- numpy: 1.19.5
- pyTorch_debug: False
- pyTorch_version: 1.10.0+cu111
- pytorch-lightning: 1.5.5
- tqdm: 4.62.3
- OS: Linux
- architecture:
- 64bit
-
- processor: x86_64
- python: 3.7.12
- version: Proposal for help #1 SMP Sat Jun 5 09:50:34 PDT 2021
Additional context
cc @justusschock @awaelchli @ninginthecloud
The text was updated successfully, but these errors were encountered: