Reduce memory usage in timeout callback tests (#4745)

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

Reduce test dataset size to use ~13 MB instead of ~1.5 GB while maintaining enough computational complexity to trigger the 10ms timeout before early stopping can converge.

Reviewed By: bshethmeta

Differential Revision: D90128255

fbshipit-source-id: 75b875d23ce459849d29acdb9d6de0828879ae46
This commit is contained in:
Alibek Zhakubayev
2026-01-05 15:00:20 -08:00
committed by meta-codesync[bot]
parent c9bab48d19
commit 3d00b44a47
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -14,9 +14,9 @@
#include <faiss/utils/random.h>
TEST(TestCallback, timeout) {
int n = 1000000;
int k = 10000;
int d = 384;
int n = 20000;
int k = 5000;
int d = 128;
int niter = 1000000000;
int seed = 42;
+3 -3
View File
@@ -13,9 +13,9 @@ class TestCallbackPy(unittest.TestCase):
super().setUp()
def test_timeout(self) -> None:
n = 1000000
k = 10000
d = 384
n = 20000
k = 5000
d = 128
niter = 1_000_000_000
x = np.random.rand(n, d).astype('float32')