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: breaking: backend indepdent definition for dp model #3208

Merged
merged 32 commits into from
Feb 2, 2024

Conversation

wanghan-iapcm
Copy link
Collaborator

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

Features:

  • abstract base classes for atomic model, fitting and descriptor.
  • dp model format for atomic models
  • dp model format for models.
  • torch support for atomic model format.
  • torch support fparam and aparam.

This pr also introduces the following updates:

  • support region and nlist in numpy code.
  • class decorator like fitting_check_output gives human readable class names.
  • support int types in precision dict.
  • fix descriptor interfaces.
  • refactor torch atomic model impl. introduces dirty hacks to be fixed.
  • provide format_nlist that format the nlist in forward_lower method.

Known limitations:

  • torch atomic model has dirty hacks
  • interfaces for descriptor, fitting and model statistics was not considered, should be fixed in future PRs.

Will be fixed

  • dp model module path is a mess to be refactorized.
  • nlist consistency should be checked. if not format nlist.
  • doc strings.
  • fparam and aparam support.

@wanghan-iapcm wanghan-iapcm changed the title feat: breaking: pt: backend indepdent definition for dp model feat: breaking: backend indepdent definition for dp model Jan 31, 2024
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

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

Comparison is base (19a8dfb) 74.36% compared to head (7be7255) 74.78%.
Report is 1 commits behind head on devel.

Files Patch % Lines
deepmd/dpmodel/descriptor/make_base_descriptor.py 70.45% 13 Missing ⚠️
deepmd/pt/train/training.py 47.61% 11 Missing ⚠️
deepmd/dpmodel/model/make_base_atomic_model.py 79.54% 9 Missing ⚠️
deepmd/pt/model/descriptor/descriptor.py 35.71% 9 Missing ⚠️
deepmd/dpmodel/descriptor/se_e2_a.py 80.95% 4 Missing ⚠️
deepmd/dpmodel/fitting/make_base_fitting.py 80.00% 4 Missing ⚠️
deepmd/pt/model/descriptor/dpa1.py 83.33% 2 Missing ⚠️
deepmd/pt/model/descriptor/dpa2.py 81.81% 2 Missing ⚠️
deepmd/pt/model/descriptor/se_a.py 80.00% 2 Missing ⚠️
deepmd/pt/model/model/pair_tab.py 75.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3208      +/-   ##
==========================================
+ Coverage   74.36%   74.78%   +0.41%     
==========================================
  Files         345      362      +17     
  Lines       32003    32391     +388     
  Branches     1594     1594              
==========================================
+ Hits        23800    24222     +422     
+ Misses       7278     7244      -34     
  Partials      925      925              

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

@wanghan-iapcm wanghan-iapcm requested a review from njzjz February 1, 2024 07:22
@njzjz njzjz added breaking change Breaking changes that should notify users. Test CUDA Trigger test CUDA workflow labels Feb 2, 2024
@github-actions github-actions bot removed the Test CUDA Trigger test CUDA workflow label Feb 2, 2024
deepmd/dpmodel/model/make_model.py Outdated Show resolved Hide resolved
@wanghan-iapcm wanghan-iapcm enabled auto-merge (squash) February 2, 2024 05:33
@wanghan-iapcm wanghan-iapcm merged commit eb9b2ef into deepmodeling:devel Feb 2, 2024
45 checks passed
@wanghan-iapcm wanghan-iapcm deleted the mdfmt-model-1 branch February 2, 2024 06:50
@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
breaking change Breaking changes that should notify users. Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants