-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[API] Support assign Tensor to ParameterList #72190
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
Merged
HydrogenSulfate
merged 6 commits into
PaddlePaddle:develop
from
HydrogenSulfate:enhance_parameter
Apr 15, 2025
Merged
[API] Support assign Tensor to ParameterList #72190
HydrogenSulfate
merged 6 commits into
PaddlePaddle:develop
from
HydrogenSulfate:enhance_parameter
Apr 15, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献! |
SigureMo
approved these changes
Apr 15, 2025
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.
github-merge-queue bot
pushed a commit
to deepmodeling/deepmd-kit
that referenced
this pull request
Apr 26, 2025
support dpa3 with paddle backend(eager mode) ### 1. training curve  ### 2. accuracy <details> <summary>torch</summary>  </details> <details> <summary>paddle(slightly better than torch)</summary>  </details> ### 3. The main modifications in this PR include: 1. Added DPA-3 code and related modules based on the Paddle backend. 2. Added the EnergyHessianStdLoss module based on the Paddle backend. 3. Discovered that Paddle’s ParameterList does not support assignment of Tensors using the equals sign. Therefore, I added support for this feature at <PaddlePaddle/Paddle#72190>. However, considering version compatibility, deepmd still uses paddle.assign for assignments. 4. Fixed an issue in env_mat_stat.py where the return type was Tensor instead of float. 5. The SiLUT used APIs from the numpy series that do not support paddle.Tensor, so I replaced them with Paddle’s native APIs. Additionally, to temporarily bypass issues with dynamic-to-static control flow, I changed the if-else branch in SiLUT.forward to a single branch. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new descriptor, DPA3, for advanced molecular simulations, including its integration and public availability. - Added support for a new graph-based neural network layer and descriptor block for RepFlow calculations. - Enabled Hessian loss computation for enhanced training capabilities. - Added new learning rate utility. - **Bug Fixes** - Improved tensor shape handling and assignments for better compatibility and stability. - **Tests** - Added comprehensive tests for the new DPA3 descriptor, including consistency, JIT, and multitask scenarios. - Expanded test coverage for model permutation and smoothness with DPA3. - Enhanced tests for DPA2 with CINN compiler support. - **Refactor** - Standardized tensor shape definitions and updated method signatures for improved clarity and type safety. - **Chores** - Updated public interfaces to include new features and descriptors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]> Signed-off-by: Duo <[email protected]> Co-authored-by: Duo <[email protected]> Co-authored-by: root <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Chenqqian Zhang <[email protected]> Co-authored-by: Jia-Xin Zhu <[email protected]> Co-authored-by: Jinzhe Zeng <[email protected]> Co-authored-by: Han Wang <[email protected]> Co-authored-by: Han Wang <[email protected]>
YqGe585
pushed a commit
to YqGe585/Paddle
that referenced
this pull request
May 7, 2025
* support assign Tensor to ParameterList * update UT * fix list comprehension gramma
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
User Experience
PR Types
New features
Description
Pcard-75624
Tensor
类型赋值给ParameterList
中的元素,行为与pytorch对齐test/legacy_test/test_imperative_container_parameterlist.py
单测中错误的权重列表生成方式,导致所有参数共享同一份数据的问题,将其改为列表解析生成