Files
faiss/tests
Justin Gibbs fa8ddd99a3 Fix flaky test for Panaorama/regular IVFFlat equivalence (#4954)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4954

Two tests — test_batch_boundaries and test_incremental_add — generated random
data (xt, xq, xb) using np.random.rand() without setting a random seed first.
This made the test data non-deterministic across runs. Occasionally, the random
data would produce vectors with very similar distances, causing slight
floating-point ordering differences between Panorama and regular IVFFlat that
pushed the overlap rate below the 0.999 threshold.

Update both tests to use a fixed random seed for all random data generation.

Reviewed By: mnorris11

Differential Revision: D97127668

fbshipit-source-id: 380cd9fe533c80a8dfd8f8ba373b17070f2c0fbe
2026-03-19 19:31:13 -07:00
..
2025-03-29 12:26:39 -07:00
2025-01-06 09:48:32 -08:00