8000 refactor: remove allows_skipping_rerank by usamoi · Pull Request #226 · tensorchord/VectorChord · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged

Conversation

usamoi
Copy link
Contributor
@usamoi usamoi commented Apr 9, 2025
  1. rename max_maxsim_tuples to maxsim_refine; leave it a default value 0
  2. remove allows_skipping_rerank; use estimated distance for vectors whose distance is not calculated

Copy link
Contributor
@Copilot Copilot AI left a 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) {

@usamoi usamoi force-pushed the skip branch 2 times, most recently from 88240d2 to 345a1ed Compare April 9, 2025 04:20
@usamoi usamoi requested a review from Copilot April 9, 2025 04:29
Copy link
Contributor
@Copilot Copilot AI left a 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);

@usamoi usamoi force-pushed the skip branch 4 times, most recently from fd3805f to 3b66826 Compare April 9, 2025 06:56
@usamoi usamoi requested a review from Copilot April 9, 2025 07:04
Copy link
Contributor
@Copilot Copilot AI left a 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>
@usamoi usamoi requested a review from Copilot April 9, 2025 08:09
@usamoi usamoi merged commit 2d2e87f into tensorchord:main Apr 9, 2025
15 checks passed
Copy link
Contributor
@Copilot Copilot AI left a 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>>);

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
0