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

pt: refact training code #3359

Merged
merged 47 commits into from
Mar 1, 2024
Merged

pt: refact training code #3359

merged 47 commits into from
Mar 1, 2024

Conversation

iProzd
Copy link
Collaborator

@iProzd iProzd commented Feb 28, 2024

This PR

  • add data_requirement for dataloader
  • reformat make_stat_input and related training code
  • support single-task & multi-task training

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

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

Project coverage is 76.53%. Comparing base (54efc03) to head (e26c118).

Files Patch % Lines
deepmd/pt/model/descriptor/se_r.py 25.00% 18 Missing ⚠️
deepmd/pt/train/training.py 83.33% 11 Missing ⚠️
deepmd/pt/model/descriptor/dpa2.py 47.36% 10 Missing ⚠️
deepmd/pt/model/descriptor/hybrid.py 25.00% 6 Missing ⚠️
deepmd/pt/loss/ener.py 83.33% 3 Missing ⚠️
deepmd/pt/model/descriptor/dpa1.py 66.66% 3 Missing ⚠️
deepmd/pt/model/descriptor/repformers.py 71.42% 2 Missing ⚠️
deepmd/pt/model/descriptor/se_a.py 84.61% 2 Missing ⚠️
deepmd/pt/utils/stat.py 84.61% 2 Missing ⚠️
deepmd/utils/data.py 90.00% 2 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3359      +/-   ##
==========================================
+ Coverage   76.06%   76.53%   +0.47%     
==========================================
  Files         421      421              
  Lines       35514    35638     +124     
  Branches     1618     1618              
==========================================
+ Hits        27013    27276     +263     
+ Misses       7633     7494     -139     
  Partials      868      868              

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

@iProzd iProzd changed the title Add data_requirement for dataloader pt: refact training code Feb 28, 2024
@iProzd iProzd requested review from CaRoLZhangxy, njzjz and wanghan-iapcm and removed request for njzjz and wanghan-iapcm February 28, 2024 17:10
source/tests/pt/test_multitask.py Fixed Show fixed Hide fixed
source/tests/pt/test_multitask.py Fixed Show fixed Hide fixed
source/tests/pt/test_multitask.py Fixed Show fixed Hide fixed
source/tests/pt/test_multitask.py Fixed Show fixed Hide fixed
@@ -83,7 +83,7 @@
param.requires_grad = trainable

def share_params(self, shared_links, resume=False):
supported_types = ["type_embedding", "descriptor", "fitting_net"]
supported_types = ["descriptor", "fitting_net"]

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable supported_types is not used.
deepmd/pt/model/model/dipole_model.py Outdated Show resolved Hide resolved
deepmd/pt/model/task/ener.py Show resolved Hide resolved
deepmd/pt/train/training.py Outdated Show resolved Hide resolved
deepmd/pt/loss/loss.py Outdated Show resolved Hide resolved
deepmd/pt/utils/finetune.py Outdated Show resolved Hide resolved
deepmd/pt/model/task/polarizability.py Outdated Show resolved Hide resolved
deepmd/pt/model/task/dipole.py Outdated Show resolved Hide resolved
deepmd/pt/model/descriptor/se_r.py Show resolved Hide resolved
deepmd/pt/train/training.py Outdated Show resolved Hide resolved
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 1, 2024
Merged via the queue into deepmodeling:devel with commit 16c6db6 Mar 1, 2024
48 checks passed
@njzjz njzjz mentioned this pull request Apr 2, 2024
@iProzd iProzd deleted the train_rf branch April 24, 2024 09:12
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.

4 participants