Skip to main content

A toolkit for end-to-end neural ad hoc retrieval

Project description

License Worfklow Documentation Status PyPI version fury.io Code style: black

Capreolus

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.

Get started with a Notebook Open In Colab

Read the documentation for a detailed overview.

Quick Start

  1. Prerequisites: Python 3.7+ and Java 11. See the installation instructions
  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! 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.
  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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capreolus-0.2.6.tar.gz (10.5 MB view details)

Uploaded Source

Built Distribution

capreolus-0.2.6-py3-none-any.whl (10.8 MB view details)

Uploaded Python 3

File details

Details for the file capreolus-0.2.6.tar.gz.

File metadata

  • Download URL: capreolus-0.2.6.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for capreolus-0.2.6.tar.gz
Algorithm Hash digest
SHA256 1c616525f291d333acf71429f95bfe6256bb75f9d7f32034bf924ad4a3c9175b
MD5 956b6acf7c55c2d9f3bb0740e639dcbf
BLAKE2b-256 dbdcbb17b1354adf3c2e7a8d82821218eb5225d75b847e706d56463b362ae8eb

See more details on using hashes here.

File details

Details for the file capreolus-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: capreolus-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for capreolus-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8746aa0dd114e9fadd3c32762a7d014efb53df34feee29d1e439598041e50d
MD5 fe30f89cad89ffc685a1085aa6f9b67e
BLAKE2b-256 a2269ec7e8ec0ca42887a13351b59d52b17099732cb313a4a2264cfb2104ad00

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page