From cae84af824d580d319f7157288e1641fed470d53 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Fri, 6 Sep 2024 13:48:54 -0700 Subject: [PATCH] Change the check metric test from using 1e-8 to (#2471) np.finfo(np.float32).eps (which is actually ~1.192e-07). This should resolve errors with the test failing. --- ci_test/unit_tests/test_unit_metric_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci_test/unit_tests/test_unit_metric_python.py b/ci_test/unit_tests/test_unit_metric_python.py index d5591d3c041..f04d8bb44d2 100644 --- a/ci_test/unit_tests/test_unit_metric_python.py +++ b/ci_test/unit_tests/test_unit_metric_python.py @@ -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'), ])