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

feat(pt): consistent "frozen" model #3450

Merged
merged 7 commits into from
Mar 12, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Mar 12, 2024

This PR is based on #3449, as the test needs #3449 to pass.

Add a consistent frozen model in pt. Both TF and PT now support using models in any format.

njzjz added 4 commits March 11, 2024 19:58
After deepmodeling#3438, `model_def_script` is no more saved in AtomicModel.

Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
@njzjz njzjz requested a review from wanghan-iapcm March 12, 2024 01:40
@njzjz njzjz changed the title feat(pt): consistent frozen model feat(pt): consistent "frozen" model Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 84.53608% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 77.34%. Comparing base (9bcae14) to head (a002a38).

Files Patch % Lines
deepmd/pt/model/model/frozen.py 80.28% 14 Missing ⚠️
deepmd/tf/model/frozen.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3450      +/-   ##
==========================================
+ Coverage   77.29%   77.34%   +0.04%     
==========================================
  Files         427      428       +1     
  Lines       36910    37005      +95     
  Branches     1621     1621              
==========================================
+ Hits        28529    28620      +91     
- Misses       7513     7517       +4     
  Partials      868      868              

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

for model_file in (pt_model, tf_model):
try:
os.remove(model_file)
except FileNotFoundError:

Check notice

Code scanning / CodeQL

Empty except Note test

'except' clause does nothing but pass and there is no explanatory comment.
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 12, 2024
Merged via the queue into deepmodeling:devel with commit da9b526 Mar 12, 2024
48 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants