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

Allow batch sampler to not have a .sampler attribute #20514

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

lantiga
Copy link
Collaborator

@lantiga lantiga commented Dec 20, 2024

What does this PR do?

This PR fixes potential compatibility issues of the fix in #20327 with codebases like NeMo that use batch samplers that are not derived from PyTorch's BatchSampler and do not have a .sampler attriubute

https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/multimodal/models/multimodal_llm/neva/neva_model.py#L1438


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

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Dec 20, 2024
Copy link
Contributor

github-actions bot commented Dec 20, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu (macOS-14, lightning, 3.9, 2.1, oldest) success
pl-cpu (macOS-14, lightning, 3.10, 2.1) success
pl-cpu (macOS-14, lightning, 3.11, 2.2.2) success
pl-cpu (macOS-14, lightning, 3.11, 2.3) success
pl-cpu (macOS-14, lightning, 3.12, 2.4.1) success
pl-cpu (macOS-14, lightning, 3.12, 2.5.1) success
pl-cpu (ubuntu-20.04, lightning, 3.9, 2.1, oldest) success
pl-cpu (ubuntu-20.04, lightning, 3.10, 2.1) success
pl-cpu (ubuntu-20.04, lightning, 3.11, 2.2.2) success
pl-cpu (ubuntu-20.04, lightning, 3.11, 2.3) success
pl-cpu (ubuntu-22.04, lightning, 3.12, 2.4.1) success
pl-cpu (ubuntu-22.04, lightning, 3.12, 2.5.1) success
pl-cpu (windows-2022, lightning, 3.9, 2.1, oldest) success
pl-cpu (windows-2022, lightning, 3.10, 2.1) success
pl-cpu (windows-2022, lightning, 3.11, 2.2.2) success
pl-cpu (windows-2022, lightning, 3.11, 2.3) success
pl-cpu (windows-2022, lightning, 3.12, 2.4.1) success
pl-cpu (windows-2022, lightning, 3.12, 2.5.1) success
pl-cpu (macOS-14, pytorch, 3.9, 2.1) success
pl-cpu (ubuntu-20.04, pytorch, 3.9, 2.1) success
pl-cpu (windows-2022, pytorch, 3.9, 2.1) success
pl-cpu (macOS-14, pytorch, 3.12, 2.5.1) success
pl-cpu (ubuntu-22.04, pytorch, 3.12, 2.5.1) success
pl-cpu (windows-2022, pytorch, 3.12, 2.5.1) success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) (testing Lightning | latest) success
pytorch-lightning (GPUs) (testing PyTorch | latest) success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.

🟢 pytorch_lightning: Benchmarks
Check ID Status
lightning.Benchmarks success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.

🟢 pytorch_lightning: Docs
Check ID Status
docs-make (pytorch, doctest) success
docs-make (pytorch, html) success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.

🟢 install
Check ID Status
install-pkg (ubuntu-22.04, fabric, 3.9) success
install-pkg (ubuntu-22.04, fabric, 3.11) success
install-pkg (ubuntu-22.04, pytorch, 3.9) success
install-pkg (ubuntu-22.04, pytorch, 3.11) success
install-pkg (ubuntu-22.04, lightning, 3.9) success
install-pkg (ubuntu-22.04, lightning, 3.11) success
install-pkg (ubuntu-22.04, notset, 3.9) success
install-pkg (ubuntu-22.04, notset, 3.11) success
install-pkg (macOS-14, fabric, 3.9) success
install-pkg (macOS-14, fabric, 3.11) success
install-pkg (macOS-14, pytorch, 3.9) success
install-pkg (macOS-14, pytorch, 3.11) success
install-pkg (macOS-14, lightning, 3.9) success
install-pkg (macOS-14, lightning, 3.11) success
install-pkg (macOS-14, notset, 3.9) success
install-pkg (macOS-14, notset, 3.11) success
install-pkg (windows-2022, fabric, 3.9) success
install-pkg (windows-2022, fabric, 3.11) success
install-pkg (windows-2022, pytorch, 3.9) success
install-pkg (windows-2022, pytorch, 3.11) success
install-pkg (windows-2022, lightning, 3.9) success
install-pkg (windows-2022, lightning, 3.11) success
install-pkg (windows-2022, notset, 3.9) success
install-pkg (windows-2022, notset, 3.11) success

These checks are required after the changes to src/lightning/pytorch/utilities/data.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79%. Comparing base (52460d3) to head (683c351).
Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (52460d3) and HEAD (683c351). Click for more details.

HEAD has 198 uploads less than BASE
Flag BASE (52460d3) HEAD (683c351)
cpu 72 24
lightning 55 18
pytest 50 0
python3.9 18 6
python3.11 18 6
lightning_fabric 13 0
python3.10 9 3
gpu 2 0
python3.12 27 9
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20514     +/-   ##
=========================================
- Coverage      88%      79%     -9%     
=========================================
  Files         267      264      -3     
  Lines       23386    23333     -53     
=========================================
- Hits        20487    18374   -2113     
- Misses       2899     4959   +2060     

@lantiga lantiga merged commit 58a749a into master Dec 21, 2024
77 checks passed
@lantiga lantiga deleted the luca/allow-batchsampler-without-sampler branch December 21, 2024 00:25
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.

1 participant