-
Notifications
You must be signed in to change notification settings - Fork 584
refact: the DPA2 descriptor #3758
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
Conversation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
|
Warning Rate Limit Exceeded@iProzd has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 1 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent updates focus on enhancing the Changes
This summary condenses the changes across different files for a more concise overview. 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 Configration File (
|
Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
for more information, see https://pre-commit.ci
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.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
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: 11
Out of diff range and nitpick comments (1)
deepmd/pt/model/descriptor/repformer_layer.py (1)
271-290: Review the initialization parameters ofAtten2Map.Consider adding default values for parameters such as
has_gateandsmoothin theAtten2Mapclass to enhance usability and avoid potential errors if these parameters are not provided.
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: 5
Out of diff range and nitpick comments (2)
deepmd/pt/model/descriptor/repformer_layer.py (2)
32-67: Consider adding type hints for_scaleand_modein theget_residualfunction to improve code readability and maintainability.
494-494: Plan to refactorgrrgfor reuse across descriptors.The method
grrgcould be reused in different descriptors. Plan a refactoring in a future PR to improve code reuse and maintainability.
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: 7
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
Out of diff range and nitpick comments (1)
deepmd/pt/model/descriptor/repformer_layer.py (1)
32-67: Consider adding type hints for all parameters in theget_residualfunction to enhance code readability and maintainability.
Summary by CodeRabbit
New Features
DescrptDPA2implementing DPA-2 functionality for computing descriptors and representations based on input coordinates and atom types.Documentation
Tests
DescrptDPA2class in different frameworks like TensorFlow, PyTorch, and DeepMD to cover various parameters and configurations.DescrptDPA2descriptor class for deep learning models in the test case classTestDescrptDPA2.