Skip to content

pt: add exported methods to BaseAtomicModel#3258

Merged
wanghan-iapcm merged 8 commits intodeepmodeling:develfrom
njzjz:pt-model-export
Feb 14, 2024
Merged

pt: add exported methods to BaseAtomicModel#3258
wanghan-iapcm merged 8 commits intodeepmodeling:develfrom
njzjz:pt-model-export

Conversation

@njzjz
Copy link
Copy Markdown
Member

@njzjz njzjz commented Feb 11, 2024

No description provided.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 11, 2024

Codecov Report

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

Comparison is base (6018e3c) 75.27% compared to head (612bedc) 75.22%.

Files Patch % Lines
deepmd/dpmodel/model/linear_atomic_model.py 40.00% 6 Missing ⚠️
deepmd/pt/model/model/linear_atomic_model.py 57.14% 6 Missing ⚠️
deepmd/dpmodel/model/dp_atomic_model.py 50.00% 4 Missing ⚠️
deepmd/dpmodel/model/pairtab_atomic_model.py 50.00% 4 Missing ⚠️
deepmd/pt/model/model/dp_atomic_model.py 66.66% 4 Missing ⚠️
deepmd/pt/model/model/pairtab_atomic_model.py 66.66% 4 Missing ⚠️
deepmd/pt/infer/deep_eval.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3258      +/-   ##
==========================================
- Coverage   75.27%   75.22%   -0.06%     
==========================================
  Files         373      373              
  Lines       33252    33327      +75     
  Branches     1604     1604              
==========================================
+ Hits        25031    25070      +39     
- Misses       7350     7386      +36     
  Partials      871      871              

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

@njzjz njzjz requested a review from wanghan-iapcm February 11, 2024 01:38
Copy link
Copy Markdown
Collaborator

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

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

It seems that these method should be abstract methods that are implemented by derived classes.

@njzjz
Copy link
Copy Markdown
Member Author

njzjz commented Feb 11, 2024 via email

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Comment thread deepmd/dpmodel/model/make_base_atomic_model.py Outdated
Comment thread deepmd/dpmodel/model/make_base_atomic_model.py Outdated
Comment thread deepmd/dpmodel/model/make_base_atomic_model.py Outdated
@wanghan-iapcm
Copy link
Copy Markdown
Collaborator

It seems that these method should be abstract methods that are implemented by derived classes.
This means there is no default value for these models. Is it expected?

On Sun, Feb 11, 2024 at 5:11 AM Han Wang @.> wrote: @.* commented on this pull request. It seems that these method should be abstract methods that are implemented by derived classes. — Reply to this email directly, view it on GitHub <#3258 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIOQ7TC5K475F3DA2UC4LLYTCKNZAVCNFSM6AAAAABDDDUU62VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNZUGMZTQOJZG4 . You are receiving this because you authored the thread.Message ID: @.***>

I would suggest forcing the developers of an atomic model to implement the methods, otherwise it may be very difficult to debug when developers do not notice the interfaces.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz requested a review from wanghan-iapcm February 12, 2024 22:29
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@wanghan-iapcm wanghan-iapcm merged commit 977b430 into deepmodeling:devel Feb 14, 2024
@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