Skip to content

Commit

Permalink
chore(pt): lower the atol for dpa2 test (deepmodeling#3785)
Browse files Browse the repository at this point in the history
Opened an issue about this:
deepmodeling#3786

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Adjusted tolerance values to improve the precision consistency for
specific tests.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
iProzd authored and mtaillefumier committed Sep 18, 2024
1 parent b80b315 commit c57b7f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/tests/consistent/descriptor/test_dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def atol(self) -> float:
use_econf_tebd,
) = self.param
if precision == "float64":
return 1e-10
return 1e-8
elif precision == "float32":
return 1e-4
else:
Expand Down
2 changes: 1 addition & 1 deletion source/tests/pt/model/test_dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_consistency(
dtype = PRECISION_DICT[prec]
rtol, atol = get_tols(prec)
if prec == "float64":
atol = 1e-11 # marginal GPU test cases...
atol = 1e-8 # marginal GPU test cases...

repinit = RepinitArgs(
rcut=self.rcut,
Expand Down

0 comments on commit c57b7f5

Please sign in to comment.