Native serialization for MultiMutableVamana index#289
Merged
razdoburdin merged 5 commits intointel:dev/razdoburdin_streamingfrom Mar 23, 2026
Merged
Conversation
rfsaliev
approved these changes
Mar 23, 2026
include/svs/index/vamana/multi.h
Outdated
Comment on lines
+633
to
+653
| consolidate(); | ||
| compact(); | ||
|
|
||
| // Since data is in order of external ids, | ||
| // convert a map of external ids to label types into a sorted vector of labels based | ||
| // on external ids. | ||
| std::vector<std::pair<external_id_type, label_type>> ext_lab_vec( | ||
| external_to_label_.begin(), external_to_label_.end() | ||
| ); | ||
| std::sort(ext_lab_vec.begin(), ext_lab_vec.end(), [](const auto& a, const auto& b) { | ||
| return a.first < b.first; | ||
| }); | ||
|
|
||
| size_t num_labels = ext_lab_vec.size(); | ||
| std::vector<label_type> labels(num_labels); | ||
| std::transform( | ||
| ext_lab_vec.begin(), | ||
| ext_lab_vec.end(), | ||
| labels.begin(), | ||
| [](const auto& ext_lab) { return ext_lab.second; } | ||
| ); |
Member
There was a problem hiding this comment.
Does it make sense to extract this preparation code to a separate method and reuse it both in tis method and in save(const filesystem::path&, const filesystem::path&, const filesystem::path)?
5e52e82
into
intel:dev/razdoburdin_streaming
16 of 19 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduce native serialization for
MultiMutableVamanaindex.Should be merged after: #286
Main changes are:
svs::index::vamana::auto_multi_dynamic_assemblerequired for direct deserialization accepts lazy loaders and call them in a flexible order to cover legacy serialized models.supports_savingflag is keeped false, as far as it isn't used.MultiMutableVamanadoesn't have an orchestrator. So no changes on this side.