ApproximateSearcher
- class lightning_ir.retrieve.base.searcher.ApproximateSearcher(index_dir: Path | str, search_config: SearchConfig, module: BiEncoderModule, use_gpu: bool = True)[source]
Bases:
SearcherMethods
search(output)Search for documents based on the output of the bi-encoder model.
- search(output: BiEncoderOutput) Tuple[PackedTensor, List[List[str]]][source]
Search for documents based on the output of the bi-encoder model.
- Parameters:
output (BiEncoderOutput) – The output from the bi-encoder model containing query and document embeddings.
- Returns:
The top-k scores and corresponding document IDs.
- Return type:
Tuple[PackedTensor, List[List[str]]]