mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
Add tolerance and assertion log to test_OIVFPQ (#5188)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5188 It breaks on unrelated tests, see https://github.com/facebookresearch/faiss/actions/runs/25464950049/job/74717916355?pr=5167 I tried it locally and differences usually favor OPQ by 0.007 at nq=100. So it could easily cross to favor non-OPQ. This adds threshold so now it has to win by additional 0.005. Should be enough to catch OPQ regressions and still prevent flakiness. Reviewed By: junjieqi Differential Revision: D104144105 fbshipit-source-id: 3223022f9c3a0c2dbeb67445b6083769e9f73e60
This commit is contained in:
committed by
meta-codesync[bot]
parent
2322afd2d8
commit
4eee3d7859
@@ -655,7 +655,10 @@ class OPQRelativeAccuracy(unittest.TestCase):
|
||||
|
||||
# verify same on OIVFPQ
|
||||
for r in 1, 10, 100:
|
||||
assert e_oivfpq[r] >= e_ivfpq[r]
|
||||
assert e_oivfpq[r] >= e_ivfpq[r] - 0.005, (
|
||||
f"recall@{r}: OPQ+IVFPQ ({e_oivfpq[r]:.4f}) "
|
||||
f"< IVFPQ ({e_ivfpq[r]:.4f})"
|
||||
)
|
||||
|
||||
|
||||
class TestRoundoff(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user