macavaney commited on
Commit
7c3346e
·
verified ·
1 Parent(s): 90870c8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -7
README.md CHANGED
@@ -10,19 +10,20 @@ task_categories:
10
  viewer: false
11
  ---
12
 
13
- # vaswani.splade.cache
14
 
15
  ## Description
16
 
17
- *TODO: What is the artifact?*
18
 
19
  ## Usage
20
 
21
  ```python
22
- # Load the artifact
23
- import pyterrier_alpha as pta
24
- artifact = pta.Artifact.from_hf('macavaney/vaswani.splade.cache')
25
- # TODO: Show how you use the artifact
 
26
  ```
27
 
28
  ## Benchmarks
@@ -32,7 +33,15 @@ artifact = pta.Artifact.from_hf('macavaney/vaswani.splade.cache')
32
  ## Reproduction
33
 
34
  ```python
35
- # TODO: Show how you constructed the artifact.
 
 
 
 
 
 
 
 
36
  ```
37
 
38
  ## Metadata
 
10
  viewer: false
11
  ---
12
 
13
+ # SPLADE vector cache for Vaswani
14
 
15
  ## Description
16
 
17
+ A SPLADE vector cache for the Vaswani dataset.
18
 
19
  ## Usage
20
 
21
  ```python
22
+ >>> # Load the artifact
23
+ >>> from pyterrier_caching import IndexerCache
24
+ >>> cache = IndexerCache.from_hf('macavaney/vaswani.splade.cache')
25
+ >>> len(cache)
26
+ 11429
27
  ```
28
 
29
  ## Benchmarks
 
33
  ## Reproduction
34
 
35
  ```python
36
+ import pyterrier as pt
37
+ pt.init()
38
+ from pyterrier_caching import IndexerCache
39
+ from pyt_splade import Splade
40
+ splade = Splade()
41
+ cache = IndexerCache('vaswani.splade.cache')
42
+ dataset = pt.get_dataset('irds:vaswani')
43
+ pipeline = splade.doc_encoder() >> cache.indexer()
44
+ pipeline.index(dataset.get_corpus_iter())
45
  ```
46
 
47
  ## Metadata