|
--- |
|
|
|
tags: |
|
- pyterrier |
|
- pyterrier-artifact |
|
- pyterrier-artifact.indexer_cache |
|
- pyterrier-artifact.indexer_cache.lz4pickle |
|
task_categories: |
|
- text-retrieval |
|
viewer: false |
|
--- |
|
|
|
# SPLADE vector cache for Vaswani |
|
|
|
## Description |
|
|
|
A SPLADE vector cache for the Vaswani dataset. |
|
|
|
## Usage |
|
|
|
```python |
|
>>> # Load the artifact |
|
>>> from pyterrier_caching import IndexerCache |
|
>>> cache = IndexerCache.from_hf('macavaney/vaswani.splade.cache') |
|
>>> len(cache) |
|
11429 |
|
``` |
|
|
|
## Benchmarks |
|
|
|
*TODO: Provide benchmarks for the artifact.* |
|
|
|
## Reproduction |
|
|
|
```python |
|
import pyterrier as pt |
|
pt.init() |
|
from pyterrier_caching import IndexerCache |
|
from pyt_splade import Splade |
|
splade = Splade() |
|
cache = IndexerCache('vaswani.splade.cache') |
|
dataset = pt.get_dataset('irds:vaswani') |
|
pipeline = splade.doc_encoder() >> cache.indexer() |
|
pipeline.index(dataset.get_corpus_iter()) |
|
``` |
|
|
|
## Metadata |
|
|
|
``` |
|
{ |
|
"type": "indexer_cache", |
|
"format": "lz4pickle", |
|
"record_count": 11429 |
|
} |
|
``` |
|
|