-
Notifications
You must be signed in to change notification settings - Fork 19
[SVS] SVS API and functionality update #676
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #676 +/- ##
==========================================
- Coverage 96.65% 96.64% -0.02%
==========================================
Files 121 121
Lines 6756 6792 +36
==========================================
+ Hits 6530 6564 +34
- Misses 226 228 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
auto sink = std::make_shared<spdlog::sinks::callback_sink_mt>(callback); | ||
auto logger = std::make_shared<spdlog::logger>("SVSIndex", sink); | ||
// Sink all messages to VecSim | ||
logger->set_level(spdlog::level::trace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alonre24, this line causes printing al lot of tracing/debug information in flow tests (unit tests use custom log callback to filter-out "debug" logs).
Do you have an idea how can we properly avoid tracing/debug information to be dumped in tests keeping ability for SVS to sink needed logs to VecSim/Redisearch?
I can set logger level to spdlog::level::info
here but it will prevent possibility to trace SVS index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we redirect the logs output to a log file in flow tests somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, there are different techniques could be used to manage VecSim logs in flow tests:
- Extend VecSim python bindings to allow changing VecSim log call back and modify flow tests. See pybind11 docs
- Manage pytest capture mode
- Modify default callback to print "debug" logs to
stdlog
+ p.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meiravgri can we address this issue in a separate PR? I believe that options 2 / 3 are better (so we still have full logs for failing tests if needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully follow — if these logs are too verbose for flow tests, wouldn't they also be noisy in production, which we probably want to avoid as well? Or is there a difference in how logging is handled between test and production environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In flow tests, all logs at every level are printed, while in production, the default level is "notice".
@dor-forer, can you please handle the logs redirection in tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean implementing option 2/3 in a separate pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
917dfcf
to
19629e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the SVS API and functionality to integrate logging, update the batch iterator API, add scalar quantization support, and enable MacOS/ARM support. Key changes include:
- Integration of a logging system and new log callback functions.
- Refactoring and API changes in the SVS index and batch iterator.
- Updates to Python bindings, CMake configuration, and dependency revisions.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/unit/test_svs.cpp | Updated tests to adapt to new vector addition/deletion logic and quantization skip conditions. |
tests/flow/test_svs.py | Replaced window_size loop variable with epsilon_rt in range query tests. |
src/python_bindings/bindings.cpp | Added bindings for the new epsilon parameter in SVSRuntimeParams. |
src/VecSim/vec_sim_common.h | Introduced the scalar quantization enum value. |
src/VecSim/index_factories/svs_factory.cpp | Added support for scalar quantization in index and vector size calculations. |
src/VecSim/algorithms/svs/svs_utils.h | Updated distance conversion functions from float to double. |
src/VecSim/algorithms/svs/svs_extensions.h | Adjusted SVSStorageTraits specialization enable_if condition. |
src/VecSim/algorithms/svs/svs_batch_iterator.h | Refactored batch iterator implementation with added done flag. |
src/VecSim/algorithms/svs/svs.h | Integrated logger creation and adjusted query result construction. |
cmake/svs.cmake | Modified SVS LVQ support check and updated the pre-compiled SVS URL. |
deps/ScalableVectorSearch | Updated subproject commit hash. |
@rfsaliev Can we merge this? |
Yes, I think so. |
19629e1
to
5997492
Compare
@dor-forer, I've rebased this PR on the last main |
@dor-forer, your approval is dismissed by rebase. |
Describe the changes in the pull request
This PR integrates SVS updates including following:
Which issues this PR fixes
Main objects this PR modified
Mark if applicable