-
Notifications
You must be signed in to change notification settings - Fork 584
fix: Avoid setting pin_memory in tests #4919
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
fix: Avoid setting pin_memory in tests #4919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the pin_memory=True parameter from PyTorch DataLoader configurations in test files to eliminate warnings when no GPU accelerator is available during testing.
- Removes
pin_memory=Truefrom three test files to prevent unnecessary warnings - Maintains all other DataLoader configuration parameters unchanged
- Improves test execution by avoiding GPU-related warnings in CPU-only environments
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| source/tests/pt/test_sampler.py | Removes pin_memory parameter from DataLoader in sampler test |
| source/tests/pt/model/test_saveload_se_e2_a.py | Removes pin_memory parameter from DataLoader in SE_e2_a model test |
| source/tests/pt/model/test_saveload_dpa1.py | Removes pin_memory parameter from DataLoader in DPA1 model test |
📝 WalkthroughWalkthroughRemoved explicit pin_memory=True from PyTorch DataLoader constructions in three test files, reverting to default pin_memory behavior. No other parameters or test logic changed. No public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
💤 Files with no reviewable changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (29)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #4919 +/- ##
=======================================
Coverage 84.29% 84.29%
=======================================
Files 703 703
Lines 68728 68727 -1
Branches 3572 3572
=======================================
+ Hits 57934 57935 +1
+ Misses 9653 9652 -1
+ Partials 1141 1140 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Avoid specifying pin_memory for test DataLoaders to eliminate warnings when no accelerator is available. deepmodeling#4874 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated test configurations to rely on default memory pinning behavior in data loading, improving compatibility across environments. * Simplified test setup parameters to reduce potential flakiness and align with framework defaults. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Avoid specifying pin_memory for test DataLoaders to eliminate warnings when no accelerator is available.
#4874
Summary by CodeRabbit