Skip to content

Commit 9a85ef6

Browse files
kuarorafacebook-github-bot
authored andcommitted
Adding bucket/path (blobstore) in dataset descriptor (facebookresearch#3848)
Summary: Pull Request resolved: facebookresearch#3848 same as title. Dataset can be referred from blobstore Reviewed By: satymish Differential Revision: D62476993 fbshipit-source-id: db2b4088ab6e02278b8b91194bf916fc476b79ec
1 parent bbddd86 commit 9a85ef6

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

benchs/bench_fw/descriptors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ class DatasetDescriptor:
8585
# sampling column for xdb
8686
sampling_column: Optional[str] = None
8787

88+
# blob store
89+
bucket: Optional[str] = None
90+
path: Optional[str] = None
91+
8892
def __hash__(self):
8993
return hash(self.get_filename())
9094

contrib/datasets.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ def get_groundtruth(self, k=100):
130130
dataset_basedir = 'data/'
131131

132132

133+
def set_dataset_basedir(path):
134+
global dataset_basedir
135+
dataset_basedir = path
136+
137+
133138
class DatasetSIFT1M(Dataset):
134139
"""
135140
The original dataset is available at: http://corpus-texmex.irisa.fr/

0 commit comments

Comments
 (0)