fix(local): skip missing multivectors during search - #1385
Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe local multivector distance calculation now detects empty matrices, records a similarity of Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change handles missing multivectors during local search while preserving normal scoring, with targeted regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Issue author here. The -inf approach looks right to me. It keeps the deleted-vector mask as the single place that decides skipping, instead of adding a second guard, and it covers my case: a collection mixing points with and without the named multivector. Caveat: this is from reading the diff. I haven't run your branch against my reproduction yet. |
|
Ran my reproduction against this branch, plus a set of cases around it. The reported case. On qdrant-client==1.18.0 it raises Why your approach beats the one I suggested. In the issue I proposed reshaping the placeholder to It fixes more than what I reported. The guard sits in Regressions I looked for and did not find. Scores for non-empty multivectors are bit-identical to 1.18.0 across three points with 2, 1 and 3 tokens. All four distances behave. One adjacent case, outside this issue's scope. An explicitly empty multivector ( |
Fixes #1383
Summary
Testing
pytest -q qdrant_client/local/tests/test_distances.py qdrant_client/local/tests/test_vectors.pypytest -q qdrant_client/local/testsuv tool run --from ruff==0.4.3 ruff check qdrant_client/local/multi_distances.py qdrant_client/local/tests/test_vectors.pygit diff --checkThe full test suite reached 78 passed and 2 skipped before
tests/congruence_tests/test_aliases.pyfailed because the local Qdrant endpoint atlocalhost:6333returned HTTP 502.