index.py
FaissIndex
dataclass
Bases: IO[Index]
IO to load from and save index data using Faiss. Calls
faiss.read_index
and faiss.write_index
under the hood.
Example usage:
>>> from pathlib import Path
>>> from ordeq_faiss import FaissIndex
>>> MyIndex = FaissIndex(
... path=Path("path/to.index")
... )