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

add neighbor stat support with NumPy and PyTorch implementation #3271

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Feb 14, 2024

I also tested examples/water,examples/nopbc, and the ANI-1x dataset (compared to the screenshot in #1624) to confirm consistent results.

Besides, as the OP supports multiple frames, the PT implementation only takes 9 s on ANI-1x, which is much faster than the TF implementation, which took over 10 min as shown in #1624.

image

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (e41b091) 74.81% compared to head (eed5f67) 74.83%.

Files Patch % Lines
deepmd/pt/utils/neighbor_stat.py 58.92% 23 Missing ⚠️
deepmd/entrypoints/neighbor_stat.py 91.30% 2 Missing ⚠️
deepmd/pt/entrypoints/main.py 33.33% 2 Missing ⚠️
deepmd/utils/neighbor_stat.py 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3271      +/-   ##
==========================================
+ Coverage   74.81%   74.83%   +0.01%     
==========================================
  Files         373      377       +4     
  Lines       33040    33165     +125     
  Branches     1604     1604              
==========================================
+ Hits        24720    24820     +100     
- Misses       7449     7474      +25     
  Partials      871      871              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz added the Test CUDA Trigger test CUDA workflow label Feb 14, 2024
@github-actions github-actions bot removed the Test CUDA Trigger test CUDA workflow label Feb 14, 2024
@njzjz
Copy link
Member Author

njzjz commented Feb 14, 2024

which is much faster than the TF implementation

We may consider applying the implementation in this PR to TF.

@njzjz njzjz changed the title add neighbor stat support for NumPy and PyTorch add neighbor stat support with NumPy and PyTorch implementation Feb 14, 2024
@wanghan-iapcm wanghan-iapcm merged commit 1d23383 into deepmodeling:devel Feb 14, 2024
49 checks passed
wanghan-iapcm pushed a commit that referenced this pull request Feb 15, 2024
Fix #3272. Apply implementation of #3271 into TF. Confirm consistent
results on `examples/water`, `examples/nopbc`, and ANI-1x (#1624).

80x speed up:

![image](https://github.com/deepmodeling/deepmd-kit/assets/9496702/85aa1fed-e3c0-4cb6-9082-db45c9a03f9d)

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
@njzjz njzjz mentioned this pull request Apr 2, 2024
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Apr 6, 2024
Fix deepmodeling#3272. Apply implementation of deepmodeling#3271 into TF. Confirm consistent
results on `examples/water`, `examples/nopbc`, and ANI-1x (deepmodeling#1624).

80x speed up:

![image](https://github.com/deepmodeling/deepmd-kit/assets/9496702/85aa1fed-e3c0-4cb6-9082-db45c9a03f9d)

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
(cherry picked from commit 02080db)

---------

Cleanup for r2.

Signed-off-by: Jinzhe Zeng <[email protected]>
njzjz added a commit that referenced this pull request Apr 6, 2024
Fix #3272. Apply implementation of #3271 into TF. Confirm consistent
results on `examples/water`, `examples/nopbc`, and ANI-1x (#1624).

80x speed up:

![image](https://github.com/deepmodeling/deepmd-kit/assets/9496702/85aa1fed-e3c0-4cb6-9082-db45c9a03f9d)

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
(cherry picked from commit 02080db)

---------

Cleanup for r2.

Signed-off-by: Jinzhe Zeng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants