Skip to content

Commit

Permalink
Change the check metric test from using 1e-8 to (LLNL#2471)
Browse files Browse the repository at this point in the history
np.finfo(np.float32).eps (which is actually ~1.192e-07).  This should
resolve errors with the test failing.
  • Loading branch information
bvanessen authored Sep 6, 2024
1 parent 794b266 commit cae84af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci_test/unit_tests/test_unit_metric_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def test_metric_with_callback():
tester.extra_callbacks.extend([
lbann.CallbackDumpWeights(directory='.', epoch_interval=1),
lbann.CallbackCheckMetric(metric='pymetric',
lower_bound=w[0] + 1 - 1e-8,
upper_bound=w[0] + 1 + 1e-8,
lower_bound=w[0] + 1 - np.finfo(np.float32).eps,
upper_bound=w[0] + 1 + np.finfo(np.float32).eps,
error_on_failure=True,
execution_modes='test'),
])
Expand Down

0 comments on commit cae84af

Please sign in to comment.