FaissIndexConfig

class lightning_ir.retrieve.faiss.faiss_indexer.FaissIndexConfig[source]

Bases: IndexConfig

Configuration class for FAISS indexers in the Lightning IR framework.

__init__()

Methods

Attributes

SUPPORTED_MODELS

classmethod from_pretrained(index_dir: Path | str) IndexConfig

Load the index configuration from a directory.

Parameters:

index_dir (Path | str) – Path to the directory containing the index configuration.

Returns:

An instance of the index configuration class.

Return type:

IndexConfig

Raises:

ValueError – If the index type in the configuration does not match the expected class name.

indexer_class

alias of FaissIndexer

save(index_dir: Path) None

Save the index configuration to a directory.

Parameters:

index_dir (Path) – The directory to save the index configuration.

to_dict() dict

Convert the index configuration to a dictionary.

Returns:

A dictionary representation of the index configuration.

Return type:

dict