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: fix loss training when no data available #3571

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

iProzd
Copy link
Collaborator

@iProzd iProzd commented Mar 20, 2024

Fix #3482 and #3483.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

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

Project coverage is 77.49%. Comparing base (145f501) to head (ee81f4b).

Files Patch % Lines
deepmd/pt/loss/ener.py 63.15% 7 Missing ⚠️
deepmd/pt/loss/ener_spin.py 63.15% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3571   +/-   ##
=======================================
  Coverage   77.48%   77.49%           
=======================================
  Files         432      432           
  Lines       37182    37202   +20     
  Branches     1620     1620           
=======================================
+ Hits        28812    28831   +19     
- Misses       7502     7503    +1     
  Partials      868      868           

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

@njzjz
Copy link
Member

njzjz commented Mar 20, 2024

I understand it could fix #3483, but what was the problem with #3482?

Copy link
Member

@njzjz njzjz left a comment

Choose a reason for hiding this comment

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

See @wanghan-iapcm's comment in #3047

@iProzd
Copy link
Collaborator Author

iProzd commented Mar 20, 2024

I understand it could fix #3483, but what was the problem with #3482?

Strangely, I can not reproduce #3482 even on current devel branch.

@iProzd
Copy link
Collaborator Author

iProzd commented Mar 20, 2024

See @wanghan-iapcm's comment in #3047

Fixed in d5e9f88

@njzjz
Copy link
Member

njzjz commented Mar 20, 2024

I understand it could fix #3483, but what was the problem with #3482?

Strangely, I can not reproduce #3482 even on current devel branch.

I rechecked it and I think you are right. I may made a mistake here... I'll close #3482 directly.

Copy link
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.

How do you test if the loss work property when the label is absent?

@iProzd
Copy link
Collaborator Author

iProzd commented Mar 21, 2024

How do you test if the loss work property when the label is absent?

fix in 602a060

@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 22, 2024
Merged via the queue into deepmodeling:devel with commit dc14719 Mar 22, 2024
48 checks passed
@iProzd iProzd mentioned this pull request Mar 24, 2024
5 tasks
github-merge-queue bot pushed a commit that referenced this pull request Mar 26, 2024
To fix #3582, should merge after #3571.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@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.

[BUG] pt: Force loss is printed as positive value when no force data is available
3 participants