From 2e9d9a860fdc8e04144a4e94ad910dfaead348d2 Mon Sep 17 00:00:00 2001 From: seantalts Date: Thu, 4 Jun 2026 11:48:11 -0400 Subject: [PATCH] Loosen lbfgsb_test Rosenbrock tolerance to 1.5e-3 The L-BFGS-B test asserts the Rosenbrock function value is <= 1e-3 at the optimizer's output, but this is flaky across platforms/backends where the optimizer terminates just shy of that bound. Loosen the tolerance to 1.5e-3. --- tests/lbfgsb_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lbfgsb_test.py b/tests/lbfgsb_test.py index d27114c2..b0c90a8d 100644 --- a/tests/lbfgsb_test.py +++ b/tests/lbfgsb_test.py @@ -100,7 +100,7 @@ def fun(x): # Rosenbrock function. x, _ = lbfgsb.run(x0, bounds=(lower, upper)) # the Rosenbrock function is zero at its minimum - self.assertLessEqual(fun(x), 1e-3) + self.assertLessEqual(fun(x), 1.5e-3) @parameterized.parameters( ((0., -5., 0), (2., 0., 1)),