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

breaking: pt: add dp model format and refactor pt impl for the fitting net. #3199

Merged
merged 16 commits into from
Jan 30, 2024

Conversation

wanghan-iapcm
Copy link
Collaborator

@wanghan-iapcm wanghan-iapcm commented Jan 29, 2024

  • add dp model format (backend independent definition) for the fitting
  • refactor torch support, compatible with dp model format
  • fix mlp issue: the idt should only be used when a skip connection is available.
  • add tools to_numpy_array and to_torch_tensor.

deepmd/model_format/fitting.py Outdated Show resolved Hide resolved
deepmd/model_format/fitting.py Show resolved Hide resolved
deepmd/pt/model/task/ener.py Outdated Show resolved Hide resolved
deepmd/pt/utils/utils.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

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

Comparison is base (4a29c8c) 21.27% compared to head (ce3116b) 74.32%.

Files Patch % Lines
deepmd/model_format/fitting.py 92.43% 9 Missing ⚠️
deepmd/pt/model/task/ener.py 95.23% 7 Missing ⚠️
deepmd/pt/model/task/fitting.py 0.00% 1 Missing ⚠️
deepmd/pt/utils/utils.py 95.83% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            devel    #3199       +/-   ##
===========================================
+ Coverage   21.27%   74.32%   +53.04%     
===========================================
  Files         343      344        +1     
  Lines       31590    31872      +282     
  Branches     1592     1592               
===========================================
+ Hits         6722    23690    +16968     
+ Misses      24170     7257    -16913     
- Partials      698      925      +227     

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

deepmd/pt/model/task/ener.py Outdated Show resolved Hide resolved
@wanghan-iapcm wanghan-iapcm requested review from njzjz and iProzd January 30, 2024 03:31
@njzjz njzjz self-assigned this Jan 30, 2024
@njzjz
Copy link
Member

njzjz commented Jan 30, 2024

I will take time to figure out what is wrong with the codeql...

@wanghan-iapcm wanghan-iapcm changed the title add dp model format for the fitting net. breaking: pt: add dp model format and refactor pt impl for the fitting net. Jan 30, 2024
@wanghan-iapcm wanghan-iapcm added this to the v3.0.0 milestone Jan 30, 2024
@wanghan-iapcm wanghan-iapcm merged commit c6a6b59 into deepmodeling:devel Jan 30, 2024
44 of 45 checks passed
@wanghan-iapcm wanghan-iapcm deleted the mdfmt-fitting branch January 30, 2024 05:56
iProzd added a commit to iProzd/deepmd-kit that referenced this pull request Jan 30, 2024
* throw errors when PyTorch CXX11 ABI is different from TensorFlow (deepmodeling#3201)

If so, throw the following error:
```
-- PyTorch CXX11 ABI: 0
CMake Error at CMakeLists.txt:162 (message):
  PyTorch CXX11 ABI mismatch TensorFlow: 0 != 1
```

Signed-off-by: Jinzhe Zeng <[email protected]>

* allow disabling TensorFlow backend during Python installation (deepmodeling#3200)

Fix deepmodeling#3120.

One can disable building the TensorFlow backend during `pip install` by
setting `DP_ENABLE_TENSORFLOW=0`.

---------

Signed-off-by: Jinzhe Zeng <[email protected]>

* breaking: pt: add dp model format and refactor pt impl for the fitting net. (deepmodeling#3199)

- add dp model format (backend independent definition) for the fitting
- refactor torch support, compatible with dp model format
- fix mlp issue: the idt should only be used when a skip connection is
available.
- add tools `to_numpy_array` and `to_torch_tensor`.

---------

Co-authored-by: Han Wang <[email protected]>

* remove duplicated fitting output check. fix codeql (deepmodeling#3202)

Co-authored-by: Han Wang <[email protected]>

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: Jinzhe Zeng <[email protected]>
Co-authored-by: Han Wang <[email protected]>
Co-authored-by: Han Wang <[email protected]>
@njzjz njzjz mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants