MDD-53: Add build_with_compression API for higher quality graph construction #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MDD-53: Add build_with_compression API for higher quality graph construction
Summary
This PR implements MDD-53, adding new Vamana index building APIs that accept uncompressed
VectorDataLoaderdata with runtime compression parameters. The key improvement is that graphs are now built using uncompressed data for higher quality, then compressed for efficient storage.Previous workflow (required manual compression):
New simplified workflow:
Changes:
auto_build_with_compression()inindex.hthat loads uncompressed data → builds graph withVamanaBuilder→ compresses data → creates finalVamanaIndexwith pre-built graph and compressed dataVamana::build_with_compression()static method following existing API patternsCompressionTypeenum (None, ScalarInt8) andCompressionParametersstruct ininclude/svs/core/compression.hcompression_build.cpp) validates recall quality across L2, IP, and Cosine distance metricsReview & Testing Checklist for Human
compression_buildtest)auto_build_with_compression()inindex.hlines 1071-1138: confirm it correctly builds graph with uncompressed data before compressingbuild_with_compression()with ScalarInt8 compression to verify:vamana.cpp) matches existing patternsTest Plan Recommendation
Notes
VamanaBuildAdaptorto handle compressed data in final index (not explicitly tested but should work based on existing patterns)CompressionParametersstruct designed to support additional compression types beyond ScalarInt8