gnes.indexer.vector.faiss module

class gnes.indexer.vector.faiss.FaissIndexer(num_dim: int, index_key: str, data_path: str, *args, **kwargs)[source]

Bases: gnes.indexer.base.BaseVectorIndexer

add(keys: List[Tuple[int, Any]], vectors: numpy.ndarray, weights: List[float], *args, **kwargs)[source]
normalize_score(score: numpy.ndarray, *args, **kwargs) → numpy.ndarray[source]
post_init()[source]

Declare class attributes/members that can not be serialized in standard way

query()[source]
size
train(*args, **kwargs)

Train the model, need to be overrided