Fix VectorScorerOSQBenchmarkTests data generation flakiness#142952
Merged
ldematte merged 3 commits intoelastic:mainfrom Feb 26, 2026
Merged
Fix VectorScorerOSQBenchmarkTests data generation flakiness#142952ldematte merged 3 commits intoelastic:mainfrom
ldematte merged 3 commits intoelastic:mainfrom
Conversation
The scalar and vectorized benchmarks generated their input data independently using the same Random seed. SIMD reduction order changes across JIT compilation tiers (e.g. reduceLanes(ADD) switching from sequential to pairwise reduction) caused the quantized data to diverge slightly between the two setup() calls, leading to >10% score differences on certain seeds. Extract data generation into a static generateBenchmarkData() method that returns a BenchmarkData record; both test benchmarks now share the same record so the input data is identical. Fixes elastic#142881 Fixes elastic#142883 Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
thecoop
reviewed
Feb 24, 2026
...hmarks/src/main/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerOSQBenchmark.java
Outdated
Show resolved
Hide resolved
…enchmark-data-generation
thecoop
approved these changes
Feb 26, 2026
PeteGillinElastic
pushed a commit
to PeteGillinElastic/elasticsearch
that referenced
this pull request
Feb 27, 2026
…142952) * Fix VectorScorerOSQBenchmarkTests data generation flakiness The scalar and vectorized benchmarks generated their input data independently using the same Random seed. SIMD reduction order changes across JIT compilation tiers (e.g. reduceLanes(ADD) switching from sequential to pairwise reduction) caused the quantized data to diverge slightly between the two setup() calls, leading to >10% score differences on certain seeds. Extract data generation into a static generateBenchmarkData() method that returns a BenchmarkData record; both test benchmarks now share the same record so the input data is identical. Fixes elastic#142881 Fixes elastic#142883 Co-authored-by: Cursor <cursoragent@cursor.com> * Renaming --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Randomseed. SIMD reduction order changes across JIT compilation tiers (e.g.,reduceLanes(ADD)switching from sequential to pairwise reduction) caused the quantized data to diverge slightly between the twosetup()calls, leading to >10% score differences on certain seeds.generateBenchmarkData()method returning aBenchmarkDatarecord. Both test benchmarks now share the same record, ensuring identical input data.writeBulkOSQVectorDatato avoid array copies when writing slices of the flat index vector array.Fixes #142881
Fixes #142883
Test plan
E503FB0D7B878481(p0=384 p1=4 NIO COSINE) andFDBBE54D76A7E1AB(p0=1024 p1=1 NIO DOT_PRODUCT)VectorScorerOSQBenchmarkTestssuite passes with--tests.iters=3ESNextOSQVectorsScorerTests(existing caller ofwriteBulkOSQVectorData) still passesMade with Cursor