A toolkit for end-to-end neural ad hoc retrieval
Project description
Capreolus
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.
Read the documentation for a detailed overview.
Quick Start
- Prerequisites: Python 3.6+ and Java 11
- Install the pip package:
pip install capreolus
- Train a model:
capreolus rerank.traineval with reranker.name=KNRM reranker.trainer.niters=2
- If the
train
command completed successfully, you've trained your first Capreolus reranker on robust04! This command created several outputs, such as run files, a loss plot, and a ranking metric plot on the dev set queries. To learn about these files, read about running experiments with Capreolus. - To learn about different configuration options, try:
capreolus rerank.print_config with reranker.name=KNRM
- To learn about different modules you can use, such as
reranker.name=DRMM
, try:capreolus modules
Environment Variables
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., ~/.bashrc
or ~/.zshrc
).
Environment Variable | Default Value | Purpose |
---|---|---|
CAPREOLUS_RESULTS |
~/.capreolus/results/ | Directory where results will be stored |
CAPREOLUS_CACHE |
~/.capreolus/cache/ | Directory used for cache files |
CUDA_VISIBLE_DEVICES |
(unset) | 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. |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for capreolus-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f1d421219cd33b7da82308f136a5fc6c35febac51f55a1bf5dac48f5def1e6e |
|
MD5 | 6d6dab6f55d9ee7da6c832ec56b6d87a |
|
BLAKE2b-256 | f56b7da30f766b16c103f8593530ad7367091e87627a68d25f0f4ef32fe3d930 |