From fd852822e8aed93c2e067a348ce5cf3f236d3ed2 Mon Sep 17 00:00:00 2001 From: Sean Talts Date: Thu, 4 Jun 2026 14:37:54 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 926894027 --- tests/lbfgsb_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/lbfgsb_test.py b/tests/lbfgsb_test.py index d27114c2..86f2bbd4 100644 --- a/tests/lbfgsb_test.py +++ b/tests/lbfgsb_test.py @@ -35,7 +35,7 @@ except ImportError: from jax.experimental import enable_x64 -# Uncomment this line to test in x64 +# Uncomment this line to test in x64 # jax.config.update('jax_enable_x64', True) class LbfgsbTest(test_util.JaxoptTestCase): @@ -100,7 +100,8 @@ 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) + # Loosened to 1.5e-3 due to float32 precision limits after dot strength reduction on CPU. + self.assertLessEqual(fun(x), 1.5e-3) @parameterized.parameters( ((0., -5., 0), (2., 0., 1)), @@ -269,7 +270,7 @@ def fit_objective(pars, data, x): data = jnp.array(1.5) res = grad_fn(0.5, jnp.array(0.0), (jnp.array(0.0), jnp.array(10.0)), data) self.assertEqual(res, data) - + def test_linear_in_box(self): # Fixing issue #492 def fun(x):