Skip to content

Commit bfa6075

Browse files
committed
compute throughput correctly
1 parent e00bd34 commit bfa6075

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

datasets.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import h5py
12
import os
23
from urllib.request import urlretrieve
34
from pathlib import Path
@@ -19,6 +20,13 @@ def prepare(dataset, task):
1920
download(url, fn)
2021
download(gt_url, gt_fn)
2122

23+
def get_query_count(dataset, task):
24+
fn, _ = get_fn(dataset, task)
25+
f = h5py.File(fn)
26+
qn = len(DATASETS[dataset][task]['queries'](f))
27+
f.close()
28+
return qn
29+
2230
DATASETS = {
2331
'ccnews-small': {
2432
'task1': {

show_operating_points.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import argparse
22
import pandas as pd
33

4+
from datasets import get_query_count
5+
46
# show best performing parameters exceeding threshold
57

68
if __name__ == "__main__":

0 commit comments

Comments
 (0)