From 3d00b44a47cdf0482b9c89de84f8ff4ac44b83a0 Mon Sep 17 00:00:00 2001 From: Alibek Zhakubayev Date: Mon, 5 Jan 2026 15:00:20 -0800 Subject: [PATCH] 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 --- tests/test_callback.cpp | 6 +++--- tests/test_callback_py.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_callback.cpp b/tests/test_callback.cpp index fa1e381b4..75d5f42c8 100644 --- a/tests/test_callback.cpp +++ b/tests/test_callback.cpp @@ -14,9 +14,9 @@ #include 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; diff --git a/tests/test_callback_py.py b/tests/test_callback_py.py index 6ec851b25..b357762ed 100644 --- a/tests/test_callback_py.py +++ b/tests/test_callback_py.py @@ -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')