-
Notifications
You must be signed in to change notification settings - Fork 525
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(pt): make 'find_' to be float in get data #3992
Conversation
WalkthroughWalkthroughThe recent updates to Changes
Sequence Diagram(s)Generating sequence diagrams for these specific changes is unnecessary since the alterations primarily involve parameter updates and conditional checks within existing functions, without significantly modifying the control flow or introducing new features. Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
deepmd/pt/train/training.py (1)
1097-1097
: Inconsistent Exclusion of Keys Containing "find_"The exclusion of keys containing "find_" is not consistently applied across the codebase. The following files contain instances of keys with "find_":
source/tests/pt/test_loss.py
source/tests/pt/model/test_model.py
source/tests/pt/model/test_linear_atomic_model_stat.py
source/tests/pt/model/test_polar_atomic_model_stat.py
source/tests/pt/model/test_atomic_model_atomic_stat.py
source/tests/pt/model/test_atomic_model_global_stat.py
source/tests/tf/test_loss_gf.py
source/tests/tf/test_gen_stat_data.py
source/tests/tf/test_deepmd_data.py
deepmd/pt/utils/stat.py
deepmd/pt/utils/dataloader.py
deepmd/pt/loss/loss.py
deepmd/pt/loss/tensor.py
deepmd/pt/loss/dos.py
deepmd/pt/loss/ener.py
deepmd/pt/loss/ener_spin.py
deepmd/tf/loss/tensor.py
deepmd/tf/loss/loss.py
deepmd/tf/loss/dos.py
deepmd/tf/train/trainer.py
deepmd/tf/infer/data_modifier.py
deepmd/utils/data_system.py
deepmd/utils/data.py
Please review these files and ensure that the exclusion of keys containing "find_" is consistently applied.
Analysis chain
LGTM! But verify the exclusion consistency.
The exclusion of keys containing "find_" in addition to "sid," "fid," and "box" is a good change to streamline data handling.
However, ensure that this exclusion is consistently applied across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the exclusion of keys containing "find_" is consistent across the codebase. # Test: Search for the usage of keys containing "find_". Expect: No inconsistent usage. rg --type python -A 5 'find_'Length of output: 60
Script:
#!/bin/bash # Description: Verify the exclusion of keys containing "find_" is consistent across the codebase. # Test: Search for the usage of keys containing "find_". Expect: No inconsistent usage. rg --type py -A 5 'find_'Length of output: 79723
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3992 +/- ##
=======================================
Coverage 82.83% 82.83%
=======================================
Files 522 522
Lines 50876 50876
Branches 3019 3020 +1
=======================================
+ Hits 42142 42143 +1
+ Misses 7799 7797 -2
- Partials 935 936 +1 ☔ View full report in Codecov by Sentry. |
make 'find_' to be float in get data, fix deepmodeling#3991 . On my device, the profiler indicates that `cudaStreamSynchronize` takes negligible time, resulting in minimal speedup. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced data loading by adding a `collate_fn` parameter for more flexible data collation. - Improved data filtering by excluding keys containing "find_" in addition to existing filters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
make 'find_' to be float in get data, fix #3991 .
On my device, the profiler indicates that
cudaStreamSynchronize
takes negligible time, resulting in minimal speedup.Summary by CodeRabbit
collate_fn
parameter for more flexible data collation.