Skip to content

fix: skip NaN scores in IVF top-k heaps - #116

Open
adrian-wang wants to merge 1 commit into
apache:mainfrom
adrian-wang:fix-topk-heap-nan-ordering
Open

adrian-wang wants to merge 1 commit into
apache:mainfrom
adrian-wang:fix-topk-heap-nan-ordering

Conversation

@adrian-wang

Copy link
Copy Markdown
Contributor

Reject both signs of NaN in FlatTopKHeap, ReaderTopKHeap, IVF-PQ TopKHeap, and the unified TopKHeap before insertion or duplicate updates. Use total_cmp for consistent heap comparisons and sorting, and reject NaN candidates in should_consider.

Add regression coverage for both NaN signs, heap capacity, duplicate IDs, and IVF-FLAT in-memory and reader inner-product searches, including padding when valid neighbors are fewer than k.

Validation: Rust workspace tests, formatting, and Clippy all pass.

Reject both signs of NaN in FlatTopKHeap, ReaderTopKHeap, IVF-PQ
TopKHeap, and the unified TopKHeap before insertion or duplicate
updates. Use total_cmp for consistent heap comparisons and sorting,
and reject NaN candidates in should_consider.

Add regression coverage for both NaN signs, heap capacity, duplicate
IDs, and IVF-FLAT in-memory and reader inner-product searches, including
padding when valid neighbors are fewer than k.

Validation: Rust workspace tests, formatting, and Clippy all pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant