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

support converting models generated in v1.3 to 2.0 compatibility #725

Merged
merged 11 commits into from
Jun 22, 2021

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Jun 10, 2021

(Next plan: add v1.2 compatibility)

@njzjz njzjz mentioned this pull request Jun 10, 2021
By the way: Compatability should be compatibility
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #725 (fc8b7f6) into devel (44d49f3) will decrease coverage by 0.22%.
The diff coverage is 37.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #725      +/-   ##
==========================================
- Coverage   74.30%   74.07%   -0.23%     
==========================================
  Files          82       78       -4     
  Lines        6534     6561      +27     
==========================================
+ Hits         4855     4860       +5     
- Misses       1679     1701      +22     
Impacted Files Coverage Δ
deepmd/utils/convert.py 26.66% <26.66%> (ø)
deepmd/entrypoints/convert.py 40.00% <40.00%> (ø)
deepmd/entrypoints/main.py 88.29% <71.42%> (-1.48%) ⬇️
deepmd/entrypoints/__init__.py 100.00% <100.00%> (ø)
source/api_cc/include/AtomMap.h
source/lib/include/neighbor_list.h
source/api_cc/include/DeepTensor.h
source/api_cc/include/DataModifier.h
source/api_cc/include/DeepPot.h
source/lib/include/SimulationRegion.h
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44d49f3...fc8b7f6. Read the comment docs.

@njzjz njzjz requested review from amcadmus and denghuilu June 10, 2021 14:39
@njzjz njzjz marked this pull request as draft June 11, 2021 01:48
@njzjz njzjz changed the title add v1.3 compatibility support converting models to 2.0 compatibility Jun 21, 2021
@njzjz njzjz changed the title support converting models to 2.0 compatibility support converting models generated in v1.3 to 2.0 compatibility Jun 21, 2021
@njzjz njzjz marked this pull request as ready for review June 21, 2021 21:45
@njzjz
Copy link
Member Author

njzjz commented Jun 21, 2021

@amcadmus I've changed the implementation: Now users can converting models directly using v2.0. There's no necessity to install the old version.

@@ -25,6 +25,26 @@ REGISTER_OP("ProdEnvMatA")
.Output("nlist: int32");
// only sel_a and rcut_r uesd.

// an alias of ProdEnvMatA -- Compatible with v1.3
REGISTER_OP("DescrptSeA")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to register DescrptSeA? the op name has changed to ProdEnvMatA by convert

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to load the old graph first when executing convert.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

Copy link
Member

@denghuilu denghuilu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A smart approach to register different ops with the same class ProdEnvMatA

@amcadmus amcadmus merged commit 4555034 into deepmodeling:devel Jun 22, 2021
@njzjz njzjz deleted the v1.3-compatibility branch June 22, 2021 21:25
gzq942560379 pushed a commit to HPC-AI-Team/deepmd-kit that referenced this pull request Sep 2, 2021
…pmodeling#725)

* add v1.3 compatibility

* remove TestModelMajorCompatability as compatibility was added

By the way: Compatability should be compatibility

* Also remove TestModelMinorCompatability

* Update test_deeppot_a.py

* Revert "Update test_deeppot_a.py"

This reverts commit a03b5ee.

* Revert "Also remove TestModelMinorCompatability"

This reverts commit 11fdd5c.

* Revert "remove TestModelMajorCompatability as compatibility was added"

This reverts commit 40dd807.

* revert allowing 0.0 model

* convert from model 1.3 to 2.0

* fix .gitignore
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Sep 18, 2024
…ath expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Sep 18, 2024
…ath expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Sep 18, 2024
…ath expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Auto convertion of model to DeePMD-kit v2.0 compatibility
4 participants