Skip to main content

Module persistence

Module persistence 

Source
Expand description

Persistence layer for HNSW indices.

Provides save/load functionality using a versioned binary file format. The format uses a fixed header for quick validation followed by bincode- serialized index data for compact storage of float arrays and adjacency lists.

Functionsยง

load_from_file
Load an HnswIndex from the file at path.
load_from_file_with_dimension
Load an HnswIndex from the file at path, and verify that its dimension matches expected_dimension.
save_to_file
Save an HnswIndex to the file at path.