From 2b0973b448f882a3c0ee0608e6086174d265bb05 Mon Sep 17 00:00:00 2001 From: Vadym Matsishevskyi Date: Wed, 18 Sep 2024 23:02:40 -0700 Subject: [PATCH] Ignore RuntimeWarning "invalid value encountered in cast" for LaxBackedNumpyTests.testUniqueEqualNan This is to fix Mac arm64 pytests on CI. The tests started failing after integrating ml-dtypes-0.5.0. Ignoring warnings is probably Ok, as it is inspired by a similar PR in ml-dtypes repo itself: https://github.com/jax-ml/ml_dtypes/pull/186 PiperOrigin-RevId: 676277042 --- tests/lax_numpy_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/lax_numpy_test.py b/tests/lax_numpy_test.py index f93e28dada71..ddf42a28e2ba 100644 --- a/tests/lax_numpy_test.py +++ b/tests/lax_numpy_test.py @@ -2134,6 +2134,9 @@ def np_fun(x): self._CheckAgainstNumpy(np_fun, jnp_fun, args_maker) @jtu.sample_product(dtype=inexact_dtypes, equal_nan=[True, False]) + @jtu.ignore_warning( + category=RuntimeWarning, message='invalid value encountered in cast' + ) def testUniqueEqualNan(self, dtype, equal_nan): shape = (20,) rng = jtu.rand_some_nan(self.rng())