fix(pt): fix model_def_script#3671
Merged
wanghan-iapcm merged 1 commit intodeepmodeling:develfrom Apr 15, 2024
Merged
Conversation
In the current code, model_def_script is modified, causing incompatibility with other backends.
Member
Author
|
In the current test, there are only tests for TF-TF, DP-DP, PT-PT, TF-DP, and PT-DP, but no tests for PT-TF, so it's impossible to find this issue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3671 +/- ##
=======================================
Coverage 81.87% 81.87%
=======================================
Files 503 503
Lines 46570 46571 +1
Branches 2952 2952
=======================================
+ Hits 38129 38130 +1
Misses 7548 7548
Partials 893 893 ☔ View full report in Codecov by Sentry. |
wanghan-iapcm
approved these changes
Apr 15, 2024
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
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.
When executing
cd examples/water/se_e2_a dp --pt train input.json dp --pt freeze dp convert-backend fromzen_model.pth frozen_model.pb dp convert-backend fromzen_model.pb frozen_model.pthAn error throws in the last step:
The reason is that
model_def_scriptis modified and further saveddeepmd-kit/deepmd/pt/model/model/__init__.py
Line 145 in 3b230c2