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

fix: the HNSW index doesn't respect to refine factor #2122

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

BubbleCal
Copy link
Contributor

No description provided.

Signed-off-by: BubbleCal <bubble-cal@outlook.com>
Copy link

ACTION NEEDED

Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@BubbleCal BubbleCal changed the title fix: HNSW index doesn't respect to refine_factor fix: HNSW index doesn't respect to refine factor Mar 28, 2024
@BubbleCal BubbleCal changed the title fix: HNSW index doesn't respect to refine factor fix: the HNSW index doesn't respect to refine factor Mar 28, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.10%. Comparing base (951a95e) to head (8742cd5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2122   +/-   ##
=======================================
  Coverage   81.09%   81.10%           
=======================================
  Files         160      160           
  Lines       47411    47412    +1     
  Branches    47411    47412    +1     
=======================================
+ Hits        38449    38454    +5     
+ Misses       6743     6741    -2     
+ Partials     2219     2217    -2     
Flag Coverage Δ
unittests 81.10% <100.00%> (+<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.

@@ -163,10 +163,11 @@ impl VectorIndex for HNSWIndex {
)
};

let ef = query.k + query.k / 2;
let k = query.k * query.refine_factor.unwrap_or(1) as usize;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: do we want to introduce a new param for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean ef?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, maybe we should just expose EF

@chebbyChefNEQ chebbyChefNEQ merged commit 2f4ed88 into lancedb:main Mar 31, 2024
17 of 19 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.

3 participants