Conversation
There was a problem hiding this comment.
Pull request overview
Refactors MinMax full-precision query handling to use the shared meta::slice abstractions (Slice/PolySlice and borrowed variants), reducing bespoke query container code and aligning query handling with the rest of the quantization metadata-slice patterns.
Changes:
- Replaces the bespoke
FullQuerystruct in MinMax withslice::PolySliceand introducesFullQueryRef/FullQueryMut. - Updates MinMax distance function impls and the MinMax quantizer to operate on
FullQueryRef/FullQueryMutandSliceaccessors (vector(),meta()). - Adds
Reborrow/ReborrowMutsupport for owningPolySliceand updates benchmark wiring accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| diskann-quantization/src/minmax/vectors.rs | Replaces FullQuery struct with PolySlice aliases; updates distance functions and tests to use FullQueryRef and slice accessors. |
| diskann-quantization/src/minmax/quantizer.rs | Updates full-precision query compression to take FullQueryMut and write via vector_mut() / meta_mut(). |
| diskann-quantization/src/minmax/multi/meta.rs | Formatting-only change (blank line). |
| diskann-quantization/src/minmax/mod.rs | Re-exports new FullQueryRef/FullQueryMut alongside FullQuery. |
| diskann-quantization/src/meta/slice.rs | Adds Reborrow / ReborrowMut impls for owning PolySlice to produce SliceRef/SliceMut. |
| diskann-benchmark/src/backend/exhaustive/minmax.rs | Updates exhaustive benchmark to use FullQueryRef and allocate FullQuery via new_in. |
Comments suppressed due to low confidence (1)
diskann-quantization/src/minmax/vectors.rs:168
- The doc comment for FullQueryMeta describes the inner product as between
X = ax * X' + bxandY, but the implementation for full-precision queries appliesa/bfromy.meta()(the quantized vector), not from the query. Please update the formula/variable names to match the code path (full-precision query vs quantized data vector) to avoid confusion.
/// The inner product between `X = ax * X' + bx` and `Y` for d-dimensional
/// vectors X and Y is:
/// ```math
/// <X, Y> = <ax * X' + bx, Y>
/// = ax * <X', Y> + bx * sum(Y).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@microsoft-github-policy-service agree company="Microsoft" |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #770 +/- ##
=======================================
Coverage 88.98% 88.98%
=======================================
Files 428 428
Lines 78365 78415 +50
=======================================
+ Hits 69730 69781 +51
+ Misses 8635 8634 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
## What's Changed ### API Breaking Changes * Remove the `experimental_avx512` feature. by @hildebrandmw in #732 * Use VirtualStorageProvider::new_overlay(test_data_root()) in tests by @Copilot in #726 * save and load max_record_size and leaf_page_size for bftrees by @backurs in #724 * [multi-vector] Verify `Standard` won't overflow in its constructor. by @hildebrandmw in #757 * VirtualStorageProvider: Make new() private, add new_physical by @Copilot in #764 * [minmax] Refactor full query by @arkrishn94 in #770 * Bump diskann-quantization to edition 2024. by @hildebrandmw in #772 ### Additions * [multi-vector] Enable cloning of `Mat` and friends. by @hildebrandmw in #759 * adding bftreepaths in mod.rs by @backurs in #775 * [quantization] Add `as_raw_ptr`. by @hildebrandmw in #774 ### Bug Fixes * Fix `diskann` compilation without default-features and add CI tests. by @hildebrandmw in #722 ### Docs and Comments * Updating the benchmark README to use diskann-benchmark by @bryantower in #709 * Fix doc comment: Windows line endings are \r\n not \n\r by @Copilot in #717 * Fix spelling errors in streaming API documentation by @Copilot in #715 * Add performance diagnostic to `diskann-benchmark` by @hildebrandmw in #744 * Add agents.md onboarding guide for coding agents by @Copilot in #765 * [doc] Fix lots of little typos in `diskann-wide` by @hildebrandmw in #771 ### Performance * [diskann-wide] Optimize `load_simd_first` for 8-bit and 16-bit element types. by @hildebrandmw in #747 ### Dependencies * Bump bytes from 1.11.0 to 1.11.1 by @dependabot[bot] in #723 * [diskann] Add note on the selection of `PruneKind` in `graph::config::Builder`. by @hildebrandmw in #734 * [diskann-providers] Remove the LRU dependency and make `vfs` and `serde_json` optional. by @hildebrandmw in #733 ### Infrastructure * Add initial QEMU tests for `diskann-wide`. by @hildebrandmw in #719 * [CI] Skip coverage for Dependabot. by @hildebrandmw in #725 * Add miri test coverage to CI workflow by @Copilot in #729 * [CI] Add minimal ARM checks by @hildebrandmw in #745 * Enable CodeQL security analysis by @Copilot in #754 ## New Contributors * @backurs made their first contribution in #724 * @arkrishn94 made their first contribution in #770 **Full Changelog**: 0.45.0...0.46.0
Refactor full precision queries for minmax to use
Sliceand its variants.