A toolkit for end-to-end neural ad hoc retrieval
Capreolus is a toolkit for conducting end-to-end ad hoc retrieval experiments. Capreolus provides fine control over the entire experimental pipeline through the use of interchangeable and configurable modules.
- Prerequisites: Python 3.7+ and Java 11. See the installation instructions
- Install the pip package:
pip install capreolus
- Train a model:
capreolus rerank.traineval with benchmark.name=nf reranker.name=KNRM reranker.trainer.niters=2
- If the
traincommand completed successfully, you've trained your first Capreolus reranker on NFCorpus! This command created several outputs, such as model checkpoints and TREC-format run files. To learn about these files, read about running experiments with Capreolus.
- To learn about different configuration options, try:
capreolus rerank.print_config with benchmark.name=nf reranker.name=KNRM
- To learn about different modules you can use, such as
- Learn about running experiments via the Python API
Capreolus uses environment variables to indicate where outputs should be stored and where document inputs can be found. Consult the table below to determine which variables should be set. Set them either on the fly before running Capreolus (
export CAPREOLUS_RESULTS=...) or by editing your shell's initialization files (e.g.,
|Directory where results will be stored
|Directory used for cache files
|Indicates GPUs available to PyTorch, starting from 0. For example, set to '1' the system's 2nd GPU (as numbered by
nvidia-smi). Set to '' (an empty string) to force CPU.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for capreolus-0.2.6-py3-none-any.whl