Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: issue with k > length in various backends #52

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

stephantul
Copy link
Member

This PR fixes an issue with extremely low item count and k. If k was higher than the number of items in the database, some backends would crash

@stephantul stephantul requested a review from Pringled December 21, 2024 18:44
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
tests/test_vicinity.py 100.00% <100.00%> (ø)
vicinity/backends/faiss.py 89.83% <100.00%> (ø)
vicinity/backends/hnsw.py 95.45% <100.00%> (-2.83%) ⬇️
vicinity/backends/usearch.py 96.96% <100.00%> (ø)
vicinity/backends/voyager.py 96.82% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@Pringled Pringled left a comment

Choose a reason for hiding this comment

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

LGTM

@stephantul stephantul merged commit 3e82218 into main Dec 27, 2024
5 checks passed
@stephantul stephantul deleted the fix-issue-with-low-k branch December 27, 2024 12:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants