From cf904357372f7cfce53c9c18c8206597464da3a7 Mon Sep 17 00:00:00 2001 From: Matthijs Douze Date: Thu, 28 Sep 2023 07:24:46 -0700 Subject: [PATCH] fix flaky GPU test Summary: Relaxed a test slightly to avoid transient failures. Errors here: https://www.internalfb.com/intern/testinfra/diagnostics/5066549780888824.844425016185500.1695878046/ https://www.internalfb.com/intern/testinfra/diagnostics/16044073676393084.844425016185500.1695809788/ Reviewed By: mlomeli1 Differential Revision: D49726244 fbshipit-source-id: 6c55efb8ff5b470dbd426129cb12fb9a0b40939f --- faiss/gpu/test/test_multi_gpu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/faiss/gpu/test/test_multi_gpu.py b/faiss/gpu/test/test_multi_gpu.py index 95762d4321..4a63025969 100644 --- a/faiss/gpu/test/test_multi_gpu.py +++ b/faiss/gpu/test/test_multi_gpu.py @@ -89,7 +89,8 @@ def do_test_sharded_ivf(self, index_key): index.add(ds.get_database()) Dnew8, Inew8 = index.search(ds.get_queries(), 10) - np.testing.assert_array_equal(Iref8, Inew8) + # np.testing.assert_array_equal(Iref8, Inew8) + self.assertLess((Iref8 != Inew8).sum(), Iref8.size * 0.003) np.testing.assert_array_almost_equal(Dref8, Dnew8, decimal=4) def test_sharded_IVFSQ(self):