-
Notifications
You must be signed in to change notification settings - Fork 31
refactor: remove allows_skipping_rerank #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (4)
src/index/scanners/maxsim.rs:186
- Ensure that sorting 'updates' followed by grouping with chunk_by correctly aggregates entries by key, as the logic relies on sorted order; consider adding tests to validate this behavior under varied inputs.
updates.sort_unstable();
crates/k_means/src/lib.rs:168
- [nitpick] Confirm that using the array's 'map' method is supported in your target Rust version; if not, consider converting the array to an iterator before applying the map to ensure compatibility.
let lowerbound = returns.map(|(x, y)| x - y * 1.9);
crates/algorithm/src/rerank.rs:42
- [nitpick] Review the comparison logic in the closure passed to pop_if; ensure that comparing 'Some(x.0)' with the value from 'self.cache.peek()' properly handles the Reverse wrapper and maintains the intended ordering.
while let Some((_, AlwaysEqual(_), AlwaysEqual(pay_u), AlwaysEqual(mean))) = pop_if(&mut self.heap, |x| { Some(x.0) > self.cache.peek().map(|x| x.0) }) {
src/index/am/mod.rs:499
- The refactoring from 'NonZeroU64' to 'NonZero' appears to be applied here; ensure that all similar changes across the codebase are consistently updated in both code and documentation.
pub const fn pointer_to_ctid(pointer: NonZero<u64>) -> (ItemPointerData, u16) {
88240d2
to
345a1ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
crates/algorithm/src/search.rs:142
- In the callback for tape::read_frozen_tape, the closure computes lowerbound but then pushes AlwaysEqual(()) for the second element instead of using a value from the closure parameters. Please verify that the intended data (e.g. the query or payload value) is correctly passed and used.
let mut callback = |(rough, err), mean, payload| {
crates/k_means/src/lib.rs:168
- The transformation of the tuple returned by process_l2 into a lowerbound value via .map(|(x, y)| x - y * 1.9) should be double-checked for correctness, ensuring that the use of the array's map method matches the intended logic for computing the lower bound.
let lowerbound = returns.map(|(x, y)| x - y * 1.9);
fd3805f
to
3b66826
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Signed-off-by: usamoi <usamoi@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
crates/k_means/src/lib.rs:168
- Verify that the array returned by process_l2 supports the map method as used here; if targeting older Rust versions, this usage may cause compatibility issues.
let lowerbound = returns.map(|(rough, err)| rough - err * 1.9);
src/index/am/mod.rs:521
- Ensure that the bit manipulation in pointer_to_kv correctly extracts the key and extra value so that the subsequent conversion with key_to_ctid remains consistent.
pub const fn pointer_to_kv(pointer: NonZero<u64>) -> ([u16; 3], u16) {
crates/algorithm/src/tuples.rs:1007
- Confirm that the update from NonZeroU8 to NonZero in ZeroU8 is propagated correctly throughout the codebase and that all related usages are compatible with this change.
pub struct ZeroU8(Option<NonZero<u8>>);
max_maxsim_tuples
tomaxsim_refine
; leave it a default value0
allows_skipping_rerank
; use estimated distance for vectors whose distance is not calculated