test_create_ivf_hnsw_pq_4bit and test_create_ivf_hnsw_pq_multivec fail their
assert_ge!(recall, 0.5) check intermittently, on main as well as on PRs.
Observed in the last day:
| where |
test |
recall |
main 91aee6f91, linux-build |
test_create_ivf_hnsw_pq_4bit::case_3_dot |
0.4 |
PR #8431, mac-build (stable) |
test_create_ivf_hnsw_pq_4bit::case_3_dot |
0.4 |
PR #8755, linux-arm |
test_create_ivf_hnsw_pq_multivec |
0.3 |
Each run was otherwise green (e.g. 3146 passed, 1 failed), and the failing test
differs by runner, so this is not a regression from any one change.
The input is already deterministic: make_seeded_vector_batch
(rust/lance/src/index/vector/ivf/v2.rs:2615) pins Seed::from(42). The variance
comes from index training instead — rust/lance-index/src/vector/kmeans.rs:930
reads
// TODO: use seed for Rng.
let mut rng = SmallRng::from_os_rng();
so centroid initialization differs every run. With K = 10 the recall metric
moves in steps of 0.1 and the threshold is 5 of 10 neighbours, so a slightly
worse set of centroids flips the assertion.
Threading a seed through KMeansParams for the test path would make these
deterministic, which the existing TODO already anticipates. Lowering the
threshold would also stop the failures but would weaken the check.
test_create_ivf_hnsw_pq_4bitandtest_create_ivf_hnsw_pq_multivecfail theirassert_ge!(recall, 0.5)check intermittently, on main as well as on PRs.Observed in the last day:
91aee6f91,linux-buildtest_create_ivf_hnsw_pq_4bit::case_3_dotmac-build (stable)test_create_ivf_hnsw_pq_4bit::case_3_dotlinux-armtest_create_ivf_hnsw_pq_multivecEach run was otherwise green (e.g. 3146 passed, 1 failed), and the failing test
differs by runner, so this is not a regression from any one change.
The input is already deterministic:
make_seeded_vector_batch(
rust/lance/src/index/vector/ivf/v2.rs:2615) pinsSeed::from(42). The variancecomes from index training instead —
rust/lance-index/src/vector/kmeans.rs:930reads
so centroid initialization differs every run. With
K = 10the recall metricmoves in steps of 0.1 and the threshold is 5 of 10 neighbours, so a slightly
worse set of centroids flips the assertion.
Threading a seed through
KMeansParamsfor the test path would make thesedeterministic, which the existing TODO already anticipates. Lowering the
threshold would also stop the failures but would weaken the check.