Repository navigation
Add distributed vector search with global top-k merging - #87
Open
everySympathy wants to merge 3 commits into
Open
everySympathy wants to merge 3 commits into
everySympathy wants to merge 3 commits into
Conversation
Contributor
|
Thanks for the PR, I will take a review |
Contributor
|
Performance gain Segment splitting is not the best option in any case the benchmark covers: 1M single query 92ms vs 35ms for native pylance, batch 437ms vs 267ms for one task per query. And it is the most complex part of the change (balanced grouping, global top-k merge, coverage check, tie semantics). Which workload is it aimed at, and is there data backing it? Splitting out batch queries to make review easier Could the query matrix (multiple query vectors at once) move to a follow-up PR and leave only the single-query case here? WDYT? Unindexed fragments I would like to understand the trade-off behind it. lance itself permits partial results for a segment-only search. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An indexed nearest-neighbor query through
read_lancecurrently executes in one scan task. This adds an opt-invector_searchAPI that assigns index segment groups to separate scan tasks and merges their candidates into a global top-k in the Daft execution plan. With the Ray runner, a single query can execute across workers; a query matrix receives an independent top-k for each query.Behavior
_distance,_rowid, and_query_id. Results sort by query ID, distance, and row ID; equal-distance membership at the k boundary is selected by Lance and can vary with segment grouping. Approximate candidate refinement also runs per task and can differ from a monolithic scanner.Benchmark
Adds a reproducible benchmark comparing native pylance, the existing Daft scan path, segment parallelism, and independent-query parallelism on the same snapshot and index. It controls local CPU/thread budgets and records raw durations, recall, environment, source hashes, and local process resource observations. Runs that fail the recall threshold do not write performance records.
Included local measurements are historical and precede the final candidate and grouping fixes. They do not measure the final implementation or establish a multi-node advantage. The benchmark guide and report document these limits and distinguish local process measurements from cluster resource costs.
Validation
daft_lance, andgit diff --checkpassed.