@@ -94,7 +94,7 @@ def _merge_categories_map(annotations: NestedDict) -> dict[str, str]:
94
94
95
95
def _maybe_prepare_manual_data (
96
96
dl_manager : tfds .download .DownloadManager ,
97
- ) -> tuple [epath .Path | None , epath .Path | None ]:
97
+ ) -> tuple [epath .Path | None , epath .Path | None , epath . Path | None ]:
98
98
"""Return paths to the manually downloaded data if it is available."""
99
99
100
100
# The file has a different name each time it is downloaded.
@@ -107,7 +107,7 @@ def _maybe_prepare_manual_data(
107
107
for file in manually_downloaded_files :
108
108
file_glob = [_ for _ in dl_manager .manual_dir .glob (file )]
109
109
if not file_glob : # No manually downloaded files.
110
- return None , None
110
+ return None , None , None
111
111
if len (file_glob ) == 1 :
112
112
files .append (file_glob [0 ])
113
113
else :
@@ -341,7 +341,9 @@ def _split_generators(self, dl_manager: tfds.download.DownloadManager):
341
341
'annotations' : _ANNOTATIONS_URL ,
342
342
})
343
343
344
- manual_train , manual_val = _maybe_prepare_manual_data (dl_manager )
344
+ manual_train , manual_val , manual_test = _maybe_prepare_manual_data (
345
+ dl_manager
346
+ )
345
347
id_map = _get_category_id_map (data ['annotations' ] / 'annotations-1.2' )
346
348
347
349
return {
@@ -363,7 +365,7 @@ def _split_generators(self, dl_manager: tfds.download.DownloadManager):
363
365
),
364
366
tfds .Split .TEST : self ._generate_examples (
365
367
data_path = data ['test' ],
366
- manual_path = None ,
368
+ manual_path = manual_test ,
367
369
annotations_path = data ['annotations' ]
368
370
/ 'annotations-1.2'
369
371
/ 'test_without_annotations.json' ,
0 commit comments