Metadata-Version: 2.1
Name: capreolus
Version: 0.1.3
Summary: A toolkit for end-to-end neural ad hoc retrieval
Home-page: https://capreolus.ai
Author: Andrew Yates
Author-email: capreolus@mpi-inf.mpg.de
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: torch (==1.2.0)
Requires-Dist: torchvision
Requires-Dist: cython
Requires-Dist: pre-commit
Requires-Dist: PyYAML (==5.1.1)
Requires-Dist: sacred (==0.7.5)
Requires-Dist: SQLAlchemy (==1.3.5)
Requires-Dist: psycopg2-binary (==2.8.3)
Requires-Dist: matplotlib (==3.1.0)
Requires-Dist: pytorch-transformers (==1.1.0)
Requires-Dist: colorlog (==4.0.2)
Requires-Dist: pytrec-eval (==0.4)
Requires-Dist: pycapnp (==0.6.4)
Requires-Dist: pytest
Requires-Dist: pyjnius (==1.2.1)
Requires-Dist: pescador (==2.0.2)
Requires-Dist: pymagnitude (==0.1.120)
Requires-Dist: h5py (==2.9.0)
Requires-Dist: pytorch-pretrained-bert (==0.4)
Requires-Dist: nltk (==3.4.5)
Requires-Dist: pymongo (==3.9.0)
Requires-Dist: lz4 (==2.1.10)
Requires-Dist: xxhash (==1.3.0)
Requires-Dist: annoy (==1.15.2)
Requires-Dist: fasteners (==0.15)
Requires-Dist: django (==2.2.9)
Requires-Dist: pytest-mock (==1.10.4)
Requires-Dist: mock
Requires-Dist: pyserini (==0.7.0.0)
Requires-Dist: scipy (==1.3.0)

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) 
[![Worfklow](https://github.com/capreolus-ir/capreolus/workflows/pytest/badge.svg)](https://github.com/capreolus-ir/capreolus/actions)
[![Documentation Status](https://readthedocs.org/projects/capreolus/badge/?version=latest)](https://capreolus.readthedocs.io/?badge=latest)
[![PyPI version fury.io](https://badge.fury.io/py/capreolus.svg)](https://pypi.python.org/pypi/capreolus/)


# Capreolus
[![Capreolus](https://people.mpi-inf.mpg.de/~ayates/capreolus/capreolus-100px.png)](https://capreolus.ai) <br/>
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.](http://capreolus.ai/)

## Quick Start
1. Prerequisites: Python 3.6+ and Java 11
2. Install the pip package: `pip install capreolus`
3. Train a model: `capreolus train with reranker=KNRM niters=2 expid=myquickstart`
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 and about how to evaluate your model, [read about running experiments with Capreolus](http://capreolus.ai/en/latest/cli.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.




