https://github.com/capreolus-ir/capreolus
A toolkit for end-to-end neural ad hoc retrieval
https://github.com/capreolus-ir/capreolus
deep-learning information-retrieval
Last synced: 6 months ago
JSON representation
A toolkit for end-to-end neural ad hoc retrieval
- Host: GitHub
- URL: https://github.com/capreolus-ir/capreolus
- Owner: capreolus-ir
- License: apache-2.0
- Created: 2019-12-01T12:38:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-20T16:16:48.000Z (almost 2 years ago)
- Last Synced: 2025-04-11T03:07:03.221Z (about 1 year ago)
- Topics: deep-learning, information-retrieval
- Language: Python
- Homepage: https://capreolus.ai
- Size: 40 MB
- Stars: 96
- Watchers: 5
- Forks: 32
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/capreolus-ir/capreolus/actions)
[](https://capreolus.readthedocs.io/?badge=latest)
[](https://pypi.python.org/pypi/capreolus/)
[](https://github.com/ambv/black)
# Capreolus
[](https://capreolus.ai)
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.
[Get started with a Notebook](https://colab.research.google.com/drive/161FnmLt3PgIXG-Z5eNg45z2iSZucVAnr?usp=sharing) [](https://colab.research.google.com/drive/161FnmLt3PgIXG-Z5eNg45z2iSZucVAnr?usp=sharing)
[Read the documentation for a detailed overview.](http://capreolus.ai/)
## Quick Start
1. Prerequisites: Python 3.7+ and Java 11. See the [installation instructions](https://capreolus.ai/en/latest/installation.html)
2. Install the pip package: `pip install capreolus`
3. Train a model: `capreolus rerank.traineval with benchmark.name=nf reranker.name=KNRM reranker.trainer.niters=2`
4. If the `train` command completed successfully, you've trained your first Capreolus reranker on [NFCorpus](https://www.cl.uni-heidelberg.de/statnlpgroup/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](http://capreolus.ai/en/latest/cli.html).
5. To learn about different configuration options, try: `capreolus rerank.print_config with benchmark.name=nf reranker.name=KNRM`
6. To learn about different modules you can use, such as `reranker.name=DRMM`, try: `capreolus modules`
7. Learn about [running experiments via the Python API](https://capreolus.ai/en/latest/quick.html)
## 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.