TorchSparseIndexer
- class lightning_ir.retrieve.pytorch.sparse_indexer.TorchSparseIndexer(index_dir: Path, index_config: TorchSparseIndexConfig, module: BiEncoderModule, verbose: bool = False)[source]
Bases:
Indexer
- __init__(index_dir: Path, index_config: TorchSparseIndexConfig, module: BiEncoderModule, verbose: bool = False) None [source]
Methods
__init__
(index_dir, index_config, module[, ...])add
(index_batch, output)save
()to_cpu
()to_gpu
()to_sparse_csr
(embeddings)