Skip to content

Conversation

@littlebullGit
Copy link
Contributor

@littlebullGit littlebullGit commented Nov 27, 2025

What does this PR do?

  • Adds a class-level fallback allow_zero_length_dataloader_with_multiple_devices so custom [LightningDataModule] subclasses remain compatible even if they skip super().__init__().
  • Adds regression coverage ensuring Trainer loops can validate with such datamodules.
  • Updates the changelog with the fix summary.

Fixes #21358

Before submitting
  • Was this discussed/agreed via a GitHub issue? ✅ (Missing property 'allow_zero_length_dataloader_with_multiple_devices' of LightningDataModule #21358)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (not needed)
  • Did you write any new necessary tests? (new regression test)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request? (none)
  • Did you update the CHANGELOG? (added “Fixed” entry)

📚 Documentation preview 📚: https://pytorch-lightning--21383.org.readthedocs.build/en/21383/

@github-actions github-actions bot added pl Generic label for PyTorch Lightning package has conflicts labels Nov 27, 2025
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82%. Comparing base (b09e96e) to head (300c41e).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (b09e96e) and HEAD (300c41e). Click for more details.

HEAD has 642 uploads less than BASE
Flag BASE (b09e96e) HEAD (300c41e)
cpu 176 30
lightning_fabric 44 0
pytest 88 0
python3.12 53 9
python3.12.7 52 9
lightning 87 15
python3.11 36 6
python3.10 17 3
python 18 3
pytorch_lightning 45 15
pytorch2.7 9 3
pytest-full 88 30
pytorch2.2.2 9 3
pytorch2.6 9 3
pytorch2.4.1 8 3
pytorch2.5.1 8 3
pytorch2.8 9 3
pytorch2.1 18 6
pytorch2.3 9 3
pytorch2.9 9 3
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #21383     +/-   ##
=========================================
- Coverage      89%      82%     -7%     
=========================================
  Files         269      266      -3     
  Lines       22063    22009     -54     
=========================================
- Hits        19737    18072   -1665     
- Misses       2326     3937   +1611     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing property 'allow_zero_length_dataloader_with_multiple_devices' of LightningDataModule

1 participant