Skip to content
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

feat: support delta merge for IVF_HNSW_SQ #2132

Merged
merged 29 commits into from
Apr 25, 2024

Conversation

BubbleCal
Copy link
Contributor

No description provided.

Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
@BubbleCal BubbleCal changed the title chore: support delta merge for IVF_HNSW_PQ chore: support delta merge for IVF_HNSW_SQ Apr 10, 2024
@BubbleCal
Copy link
Contributor Author

this is not efficient because it just skipped the IVF & quantization training, the graph will be re-constructed.
I will leave the optimization (reuse the existing graph) to the next PR

@BubbleCal BubbleCal requested a review from eddyxu April 10, 2024 13:45
@BubbleCal BubbleCal marked this pull request as ready for review April 10, 2024 13:45
Signed-off-by: BubbleCal <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 79.60199% with 82 lines in your changes are missing coverage. Please review.

Project coverage is 81.16%. Comparing base (444328e) to head (be504f4).

Files Patch % Lines
rust/lance/src/index/vector/ivf.rs 78.39% 26 Missing and 17 partials ⚠️
rust/lance-index/src/vector/quantizer.rs 50.79% 30 Missing and 1 partial ⚠️
rust/lance/src/index/vector/fixture_test.rs 0.00% 2 Missing ⚠️
rust/lance/src/index/vector/pq.rs 0.00% 2 Missing ⚠️
rust/lance/src/session/index_extension.rs 0.00% 2 Missing ⚠️
rust/lance-index/src/vector/hnsw/builder.rs 66.66% 0 Missing and 1 partial ⚠️
rust/lance/src/index/vector/ivf/io.rs 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2132      +/-   ##
==========================================
+ Coverage   81.15%   81.16%   +0.01%     
==========================================
  Files         186      186              
  Lines       54163    54521     +358     
  Branches    54163    54521     +358     
==========================================
+ Hits        43954    44250     +296     
- Misses       7729     7776      +47     
- Partials     2480     2495      +15     
Flag Coverage Δ
unittests 81.16% <79.60%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wjones127 wjones127 changed the title chore: support delta merge for IVF_HNSW_SQ feat: support delta merge for IVF_HNSW_SQ Apr 22, 2024
Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally looks good. @BubbleCal when you have time this week, can you rebase the PR? I'm going to need to rebase my work in #2192 on this.

let reader =
RecordBatchIterator::new(vec![record_batch].into_iter().map(Ok), schema.clone());
dataset.append(reader, None).await.unwrap();
let mut dataset = DatasetBuilder::from_uri(test_uri).load().await.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why reload the dataset here? It's already open, isn't it?

Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
Signed-off-by: BubbleCal <[email protected]>
@BubbleCal BubbleCal merged commit 6d1364b into lancedb:main Apr 25, 2024
17 checks passed
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.

None yet

3 participants