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: make Metric the basic unit for metrics, not str #44

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

stephantul
Copy link
Member

@stephantul stephantul commented Dec 5, 2024

We used a string as the basic unit for all metrics, but we already have a really nice way of expressing which metrics we should use: the Metric Enum.

This PR changes all stored metrics to be Metric Enum values, and not backend-specific strings. This makes Enum values comparable over backends.

@stephantul stephantul requested a review from Pringled December 5, 2024 09:49
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
vicinity/backends/basic.py 66.66% 2 Missing ⚠️
vicinity/backends/voyager.py 80.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
vicinity/backends/annoy.py 95.18% <100.00%> (+0.24%) ⬆️
vicinity/backends/base.py 85.50% <100.00%> (+2.45%) ⬆️
vicinity/backends/faiss.py 89.74% <100.00%> (ø)
vicinity/backends/hnsw.py 95.38% <100.00%> (-2.90%) ⬇️
vicinity/backends/pynndescent.py 95.52% <100.00%> (-1.26%) ⬇️
vicinity/backends/usearch.py 96.92% <100.00%> (ø)
vicinity/backends/voyager.py 96.77% <80.00%> (ø)
vicinity/backends/basic.py 77.86% <66.66%> (-12.46%) ⬇️

... and 1 file with indirect coverage changes

@stephantul stephantul merged commit aeaccaa into main Dec 6, 2024
5 checks passed
@Pringled Pringled deleted the add-metric-to-base-args branch December 11, 2024 20:26
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