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 Language grade: Python

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.

Read the documentation for a detailed overview.

Quick Start

  1. Prerequisites: Python 3.6+ and Java 11
  2. Install the pip package: pip install capreolus
  3. Train a model: capreolus rerank.traineval with reranker.name=KNRM reranker.trainer.niters=2
  4. 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.
  5. To learn about different configuration options, try: capreolus rerank.print_config with reranker.name=KNRM
  6. 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


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.4.1.tar.gz (10.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: capreolus-0.2.4.1.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6

File hashes

Hashes for capreolus-0.2.4.1.tar.gz
Algorithm Hash digest
SHA256 217c00dc38ee76e6bcaa1bf754f9a0cadb01af25cb13df785128378ae382db20
MD5 4621c67916f6c89e880dd98944984407
BLAKE2b-256 6eb696308802805e74b5602d4eb583ab44a2b6ab570f00f97308125a3662fa05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: capreolus-0.2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6

File hashes

Hashes for capreolus-0.2.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ecdd359c19e46a90e3c55b4aa17ee445a5bdc97f87213a4933f41a594968ed1
MD5 ca69aa0738c6ab2448714b841428e6c6
BLAKE2b-256 58a5799b2c48c36e41eafba082ff89876a79e43b885787309042e461ac9112a9

See more details on using hashes here.

Supported by

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