Skip to content

Conversation

@meiravgri
Copy link
Collaborator

@meiravgri meiravgri commented Jan 7, 2026

This PR generalizes the GetDistFunc template to support comparing vectors of different types.

Changes

  • Extended GetDistFunc template signature from <DataType, DistType> to <VecType1, DistType, VecType2 = VecType1>, where VecType2 defaults to VecType1 for symmetric comparisons
  • Introduced vecsim_types::sq8 type to represent scalar-quantized 8-bit vectors
  • Added GetDistFunc specializations for SQ8:
    • Symmetric: GetDistFunc<sq8, float> → SQ8-to-SQ8 distance functions
    • Asymmetric: GetDistFunc<sq8, float, float> → SQ8-to-float distance functions
  • Added unit tests

@meiravgri meiravgri changed the title Add SQ8 distance functions and tests for metric validation Add SQ8 type support to GetDistFunc template Jan 7, 2026
@meiravgri meiravgri changed the title Add SQ8 type support to GetDistFunc template [MOD-13347] Add SQ8 type support to GetDistFunc template Jan 7, 2026
@meiravgri meiravgri requested a review from dor-forer January 7, 2026 13:06
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.15%. Comparing base (997ca70) to head (6cbabd1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
+ Coverage   97.04%   97.15%   +0.11%     
==========================================
  Files         128      128              
  Lines        7586     7604      +18     
==========================================
+ Hits         7362     7388      +26     
+ Misses        224      216       -8     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@meiravgri meiravgri enabled auto-merge January 7, 2026 13:50
@meiravgri meiravgri added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit 1d52631 Jan 7, 2026
18 checks passed
@meiravgri meiravgri deleted the meiravg_get_dist_func_sq8 branch January 7, 2026 14:23
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