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

fix(pt): fix model_def_script #3671

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Apr 14, 2024

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.pth

An error throws in the last step:

TypeError: deepmd.tf.descriptor.descriptor.Descriptor() got multiple values for keyword argument 'ntypes'

The reason is that model_def_script is modified and further saved

model_params["descriptor"]["ntypes"] = ntypes

In the current code, model_def_script is modified, causing incompatibility with other backends.
@njzjz
Copy link
Member Author

njzjz commented Apr 14, 2024

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.

Copy link

codecov bot commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.87%. Comparing base (3eb3d51) to head (3b230c2).

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.
📢 Have feedback on the report? Share it here.

@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Apr 15, 2024
Merged via the queue into deepmodeling:devel with commit b3d6c70 Apr 15, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants