From 302ddd59be73bbe926f1e6ffbd60e8b0c5b5de4e Mon Sep 17 00:00:00 2001 From: Tom Denton Date: Tue, 3 Dec 2024 11:36:41 -0800 Subject: [PATCH] Increase entropy in test source creation to prevent flakiness. PiperOrigin-RevId: 702413537 --- hoplite/db/tests/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoplite/db/tests/test_utils.py b/hoplite/db/tests/test_utils.py index a0f09a0..42cd0c7 100644 --- a/hoplite/db/tests/test_utils.py +++ b/hoplite/db/tests/test_utils.py @@ -70,7 +70,7 @@ def insert_random_embeddings( embedding = np.float32(rng.normal(size=emb_dim, loc=0, scale=0.1)) dataset_name = rng.choice(dataset_names) source_name = ''.join( - [str(a) for a in np.random.choice(np_alpha, size=3, replace=False)] + [str(a) for a in rng.choice(np_alpha, size=8, replace=False)] ) offsets = rng.integers(0, 100, size=[1]) source = interface.EmbeddingSource(dataset_name, source_name, offsets)