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
Fix enforce_datamodule_dataloader_override() for iterable datasets
This function has the if statement `if (train_dataloader or val_dataloaders) and datamodule:`.
The issue is similar to that in Lightning-AI#1560. The problem is that the `if(dl)` translates to `if(bool(dl))`, but there's no dataloader.__bool__ so bool() uses dataloader.__len__ > 0. But... dataloader.__len__ uses IterableDataset.__len__ for IterableDatasets for which __len__ is undefined.
The fix is also the same, the `if dl` should be replaced by `if dl is not None`.
0 commit comments