Skip to content

Native serialization for InvertedIndex#298

Closed
razdoburdin wants to merge 7 commits intointel:mainfrom
razdoburdin:streaming/inverted
Closed

Native serialization for InvertedIndex#298
razdoburdin wants to merge 7 commits intointel:mainfrom
razdoburdin:streaming/inverted

Conversation

@razdoburdin
Copy link
Contributor

This PR introduce native serialization for Inverted index.

Main changes are:

  1. New overload of svs::index::inverted::assemble_from_clustering accepting istream is introduced.
  2. Added related tests.

razdoburdin and others added 7 commits March 4, 2026 15:00
Reopening of intel#275 for
developer branch

---------

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR introduce native serialization for DynamicFlat index.

Main changes are:
1. `auto_dynamic_assemble` now accepts lazy loader. That is mandatory
for buffer-free deserialization.
2. new class `Deserializer' is introduced. It is responsible for
conditional reading of overhead data (like names of temporary files) in
case of legacy models.
3. `IDTranslator` is refactored to cover save and load to/from stream.

---------

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
This PR introduce native serialization for `Vamana` index.

Main changes are:
1. New overload of `svs::index::vamana::auto_assemble` required for
direct deserialization accepts lazy loaders and call them in a flexible
order to cover legacy serilized models.
2. `save_table` method is renamed to `metadata` to avoid confusions, as
far as it doesn't save anything.
3. Some minor refactoring to streamline the logic.
4. Serialization for `MutableVamana` is also implemented to avoid
compilation errors. Deserialization and related tests for
`MutableVamana` are expected later.

---------

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
Co-authored-by: Rafik Saliev <rafik.f.saliev@intel.com>
This PR introduce native serialization for `MutableVamana` index.

Main changes are:

1. New overload of svs::index::vamana::auto_dynamic_assemble required
for direct deserialization accepts lazy loaders and call them in a
flexible order to cover legacy serialized models.
2. The test file tests/svs/index/vamana/dynamic_index.cpp is returned to
the test build, as far as it is the right place for serialization tests.
3. Some minor refactoring to streamline the logic.

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
This PR diverse deserialization paths for newly serialized models with a
legacy ones.

The main changes are:
1. Legacy models are now deserialized with intermediate files, as it was
done before.
2. Native deserialization path is cleaned, as far as we don't need
support of legacy models for this path.

---------

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
This PR introduce native serialization for IVF index.

Main changes are:

1. New overload of svs::index::ivf::load_ivf_index accpting istream is
introduced.
2. Added related tests.
3. save(std::ostream&) method for DynamicIVF is just a placeholder for
now. Real implementation is expected later.

Co-authored-by: Dmitry Razdoburdin <drazdobu@intel.com>
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.

1 participant