Fix test timeouts (#2618)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2618

The Faiss tests run in dev mode are very slow
The PQ polysemous training is particularly sensitive to this with the default settings.
This diff adds a "np" suffix to two PQ factory strings to disable polysemous training. The tests that are detected as flaky because they occasionally time out.

Reviewed By: alexanderguzhva

Differential Revision: D41955699

fbshipit-source-id: b1e0382a0142a3ed28b498c5ea6f5499de2c1b3f
This commit is contained in:
Matthijs Douze
2022-12-12 09:04:43 -08:00
committed by Facebook GitHub Bot
parent fa53e2c941
commit 240e6dda08
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -776,7 +776,7 @@ class TestNSG(unittest.TestCase):
"""Test IndexNSGPQ"""
d = self.xq.shape[1]
R, pq_M = 32, 4
index = faiss.index_factory(d, f"NSG{R}_PQ{pq_M}")
index = faiss.index_factory(d, f"NSG{R}_PQ{pq_M}np")
assert isinstance(index, faiss.IndexNSGPQ)
idxpq = faiss.downcast_index(index.storage)
assert index.nsg.R == R and idxpq.pq.M == pq_M
+1 -1
View File
@@ -163,7 +163,7 @@ class TestMerge2(unittest.TestCase):
self.do_flat_codes_test("Flat")
def test_merge_IndexPQ(self):
self.do_flat_codes_test("PQ8")
self.do_flat_codes_test("PQ8np")
def test_merge_IndexLSH(self):
self.do_flat_codes_test("LSHr")