You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: hnsw recall@10 test flakes on CI (0.58-0.65 vs ~0.98) — parallel_insert makes the graph nondeterministic #302
hnsw_index::tests::test_hnsw_recall_at_10_on_3000_random_vectors (src/hnsw_index_tests.rs:82) sometimes fails on CI with recall far below its 0.95 bar. Each run's recall varies even though the data seeds are fixed.
Evidence
The data uses seed 42 (3000 rows, dim 32) and the queries use seed 4242 (100 queries). m=16, ef_construction=200, ef_search=64, cosine distance.
HnswIndex::build inserts with hnsw_rsparallel_insert (src/hnsw_index.rs:107). That makes the graph depend on thread scheduling, so recall varies even with fixed data. On a loaded CI runner, an occasional build produces a much worse graph. Usual recall is about 0.98; the bad builds dropped to 0.58-0.65.
Options
Build the test index deterministically (serial insert) and keep the 0.95 bar.
Find out why some parallel builds come out degenerate. A 0.58 recall at ef_search=64 may point to a real build-quality problem under contention, not just test noise.
Activity
fix(vector-index): end the hnsw_rs deadlock that hung .index create, …