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: refine_factor should be used in search_in_partition for IVF V2 Indices #2933

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

erikml-db
Copy link
Contributor

In testing we saw that refine_factor was not increasing recall even when set to a large enough value that it should be doing brute force search in V3 indices. After tracing through the code we found that refine_factor was not being utilized in the individual partitions search_in_partition function, so they could only return at most k values to be refined. This change makes it so that the search_in_partition function will return refine_factor * k values for further refinement.

@github-actions github-actions bot added the bug Something isn't working label Sep 25, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.74%. Comparing base (4e40ed6) to head (25a946b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2933      +/-   ##
==========================================
- Coverage   77.75%   77.74%   -0.02%     
==========================================
  Files         231      231              
  Lines       70485    70487       +2     
  Branches    70485    70487       +2     
==========================================
- Hits        54808    54799       -9     
  Misses      12773    12773              
- Partials     2904     2915      +11     
Flag Coverage Δ
unittests 77.74% <100.00%> (-0.02%) ⬇️

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.

@chebbyChefNEQ chebbyChefNEQ merged commit 58ecfbb into lancedb:main Sep 26, 2024
22 checks passed
@erikml-db erikml-db deleted the fix-refine branch September 26, 2024 16:53
ankitvij-db pushed a commit to ankitvij-db/lance that referenced this pull request Sep 26, 2024
…V2 Indices (lancedb#2933)

In testing we saw that `refine_factor` was not increasing recall even
when set to a large enough value that it should be doing brute force
search in V3 indices. After tracing through the code we found that
`refine_factor` was not being utilized in the individual partitions
`search_in_partition` function, so they could only return at most `k`
values to be refined. This change makes it so that the
`search_in_partition` function will return `refine_factor * k` values
for further refinement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants