Fix broken fbcode//faiss/tests:test_index_binary - test_replicas (test_index_binary.TestReplicasAndS (#5258)

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

Reviewed By: limqiying

Differential Revision: D106125838

fbshipit-source-id: e1cf62d25f7d270e69489be8dee2f3aad820bcd3
This commit is contained in:
generatedunixname3846135475516776
2026-05-29 19:25:51 -07:00
committed by meta-codesync[bot]
parent 1cb7601829
commit 140541590e
+4 -2
View File
@@ -384,7 +384,9 @@ class TestReplicasAndShards(unittest.TestCase):
Dref, Iref = index_ref.search(xq, 10)
nrep = 5
index = faiss.IndexBinaryReplicas()
# threaded=False: avoid one WorkerThread per replica. The threaded
# path has hung in CI on aarch64 RE workers (see T272565319).
index = faiss.IndexBinaryReplicas(False)
for _i in range(nrep):
sub_idx = faiss.IndexBinaryFlat(d)
sub_idx.add(xb)
@@ -396,7 +398,7 @@ class TestReplicasAndShards(unittest.TestCase):
self.assertTrue((Dref == D).all())
self.assertTrue((Iref == I).all())
index2 = faiss.IndexBinaryReplicas()
index2 = faiss.IndexBinaryReplicas(False)
for _i in range(nrep):
sub_idx = faiss.IndexBinaryFlat(d)
index2.addIndex(sub_idx)