Skip to content

Commit 5fc5de3

Browse files
committed
fix data_list_path filename
1 parent 6256b71 commit 5fc5de3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pygmtools/benchmark.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, name, sets, obj_resize=(256, 256), problem='2GM', filter='int
5959
data_set = eval(self.name)(self.sets, self.obj_resize, **args)
6060
suffix = data_set.suffix
6161
self.data_path = os.path.join(data_set.dataset_dir, 'data-' + str(self.obj_resize) + '-' + suffix + '.json')
62-
self.data_list_path = os.path.join(data_set.dataset_dir, sets + '.json')
62+
self.data_list_path = os.path.join(data_set.dataset_dir, sets + '-' + suffix + '.json')
6363
self.classes = data_set.classes
6464

6565
with open(self.data_path) as f:

pygmtools/dataset.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def process(self):
310310
Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for
311311
training set, and ``test.json`` for testing set.
312312
"""
313-
train_file = os.path.join(self.dataset_dir, 'train.json')
314-
test_file = os.path.join(self.dataset_dir, 'test.json')
313+
train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json')
314+
test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json')
315315
img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json')
316316
if not (os.path.exists(train_file) and os.path.exists(test_file) and os.path.exists(img_file)):
317317
if not (os.path.exists(train_file) and os.path.exists(test_file)):
@@ -564,8 +564,8 @@ def process(self):
564564
Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for
565565
training set, and ``test.json`` for testing set.
566566
"""
567-
train_file = os.path.join(self.dataset_dir, 'train.json')
568-
test_file = os.path.join(self.dataset_dir, 'test.json')
567+
train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json')
568+
test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json')
569569
img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json')
570570

571571
data_list = []
@@ -850,8 +850,8 @@ def process(self):
850850
Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for
851851
training set, and ``test.json`` for testing set.
852852
"""
853-
train_file = os.path.join(self.dataset_dir, 'train.json')
854-
test_file = os.path.join(self.dataset_dir, 'test.json')
853+
train_file = os.path.join(self.dataset_dir, 'train-' + self.suffix + '.json')
854+
test_file = os.path.join(self.dataset_dir, 'test-' + self.suffix + '.json')
855855
img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json')
856856
if (not os.path.exists(train_file)) or (not os.path.exists(test_file)) or (not os.path.exists(img_file)):
857857
train_list = []
@@ -1104,7 +1104,7 @@ def process(self):
11041104
Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for
11051105
training set, and ``test.json`` for testing set.
11061106
"""
1107-
set_file = os.path.join(self.dataset_dir, self.sets + '.json')
1107+
set_file = os.path.join(self.dataset_dir, self.sets + '-' + self.suffix + '.json')
11081108
img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json')
11091109

11101110
if not os.path.exists(set_file):
@@ -1301,7 +1301,7 @@ def process(self):
13011301
Process the dataset and generate ``data-(size, size).json`` for preprocessed dataset, ``train.json`` for
13021302
training set, and ``test.json`` for testing set.
13031303
"""
1304-
set_file = os.path.join(self.dataset_dir, self.sets + '.json')
1304+
set_file = os.path.join(self.dataset_dir, self.sets + '-' + self.suffix + '.json')
13051305
img_file = os.path.join(self.dataset_dir, 'data-' + str(self.obj_resize) + '-' + self.suffix + '.json')
13061306

13071307
if not os.path.exists(set_file):

0 commit comments

Comments
 (0)