mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-11 22:50:00 +00:00
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:
committed by
meta-codesync[bot]
parent
c9bab48d19
commit
3d00b44a47
@@ -14,9 +14,9 @@
|
|||||||
#include <faiss/utils/random.h>
|
#include <faiss/utils/random.h>
|
||||||
|
|
||||||
TEST(TestCallback, timeout) {
|
TEST(TestCallback, timeout) {
|
||||||
int n = 1000000;
|
int n = 20000;
|
||||||
int k = 10000;
|
int k = 5000;
|
||||||
int d = 384;
|
int d = 128;
|
||||||
int niter = 1000000000;
|
int niter = 1000000000;
|
||||||
int seed = 42;
|
int seed = 42;
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ class TestCallbackPy(unittest.TestCase):
|
|||||||
super().setUp()
|
super().setUp()
|
||||||
|
|
||||||
def test_timeout(self) -> None:
|
def test_timeout(self) -> None:
|
||||||
n = 1000000
|
n = 20000
|
||||||
k = 10000
|
k = 5000
|
||||||
d = 384
|
d = 128
|
||||||
niter = 1_000_000_000
|
niter = 1_000_000_000
|
||||||
|
|
||||||
x = np.random.rand(n, d).astype('float32')
|
x = np.random.rand(n, d).astype('float32')
|
||||||
|
|||||||
Reference in New Issue
Block a user