gnes.indexer.chunk.faiss module

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

Bases: gnes.indexer.base.BaseChunkIndexer

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

adding new chunks and their vector representations :param keys: list of (doc_id, offset) tuple :param vectors: vector representations :param weights: weight of the chunks

post_init()[source]

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

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

Train the model, need to be overrided