File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
tensorflow_datasets/image Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -333,8 +333,32 @@ def _split_generators(self, dl_manager):
333
333
"test_data" : 'emnist-{}-test-images-idx3-ubyte' .format (self .builder_config .name ),
334
334
"test_labels" : 'emnist-{}-test-labels-idx1-ubyte' .format (self .builder_config .name ),
335
335
}
336
+
336
337
dir_name = dl_manager .manual_dir
337
338
339
+ if not tf .io .gfile .exists (os .path .join (dir_name , filenames ['train_data' ])):
340
+ # The current tfds.core.download_manager is unable to extract multiple and nested files.
341
+ # We'll add soon!
342
+ msg = "You must download and extract the dataset files manually and place them in : "
343
+ msg += dl_manager .manual_dir
344
+ msg += """File tree must be like this :\n
345
+ .
346
+ ├── emnist
347
+ │ ├── emnist-byclass-train-images-idx3-ubyte
348
+ │ ├── emnist-byclass-train-labels-idx3-ubyte
349
+ │ ├── emnist-byclass-test-images-idx3-ubyte
350
+ │ ├── emnist-byclass-test-labels-idx3-ubyte
351
+ │ ├── emnist-bymerge-train-images-idx3-ubyte
352
+ │ ├── emnist-bymerge-train-labels-idx3-ubyte
353
+ │ ├── emnist-bymerge-test-images-idx3-ubyte
354
+ │ ├── emnist-bymerge-test-labels-idx3-ubyte
355
+ │ ├── .......
356
+ │ ├── .....
357
+ │ ├── ...
358
+ │ ├──
359
+ """
360
+ raise FileNotFoundError (msg .replace (" " , "" ))
361
+
338
362
return [
339
363
tfds .core .SplitGenerator (
340
364
name = tfds .Split .TRAIN ,
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ class KMNISTTest(MNISTTest):
52
52
53
53
54
54
class EMNISTTest (MNISTTest ):
55
- DATASET_CLASS = mnist .EMNIST
56
- BUILDER_CONFIG_NAMES_TO_TEST = ["test" ]
55
+ DATASET_CLASS = mnist .EMNIST
56
+ BUILDER_CONFIG_NAMES_TO_TEST = ["test" ]
57
57
58
58
59
59
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments