Skip to content

Fix flaky accelerated HNSW gaps test - #2709

Open
viclafargue wants to merge 3 commits into
NVIDIA:mainfrom
viclafargue:fix-accelerated-hnsw-gaps-test
Open

viclafargue wants to merge 3 commits into
NVIDIA:mainfrom
viclafargue:fix-accelerated-hnsw-gaps-test

Conversation

@viclafargue

Copy link
Copy Markdown
Contributor

Closes #2551.

The gaps test required the search to return the exact closest K documents. HNSW search can return a nearby document just outside that set. With the seed from #2551, the test sometimes requested five results and rejected document 858 because it was sixth closest.

This PR updates the test in the following way :

  • Check that returned documents have vectors and that each score matches its document's vector, without requiring an exact ranking.
  • Limit K to the number of documents that have vectors, so the test cannot request more results than exist.
  • Remove the unused exact-ranking calculation.

@viclafargue
viclafargue requested a review from a team as a code owner October 1, 2026 12:31
@viclafargue viclafargue added bug Something isn't working non-breaking Introduces a non-breaking change labels Oct 1, 2026
@viclafargue viclafargue self-assigned this Oct 1, 2026
@viclafargue
viclafargue requested a review from imotov October 1, 2026 15:46

@imotov imotov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a suggestion to relax the failing part instead of removing it completely. Otherwise LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

[CI] TestCuVSAcceleratedHNSWGaps.testVectorSearchWithAlternatingDocuments is flaky

2 participants