leonhardhennig commited on
Commit
d58a8a5
1 Parent(s): 3d90083

Move manual dir check to the top of the _split_generators method

Browse files
Files changed (1) hide show
  1. multitacred.py +7 -6
multitacred.py CHANGED
@@ -367,12 +367,7 @@ class MultiTacred(datasets.GeneratorBasedBuilder):
367
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
368
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
369
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
370
- patch_files = {}
371
- if self.config.label_variant == _REVISITED:
372
- patch_files = dl_manager.download_and_extract(_PATCH_URLs)
373
- elif self.config.label_variant == _RETACRED:
374
- patch_files = dl_manager.download_and_extract(_RETACRED_PATCH_URLs)
375
-
376
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
377
 
378
  if not os.path.exists(data_dir):
@@ -384,6 +379,12 @@ class MultiTacred(datasets.GeneratorBasedBuilder):
384
  )
385
  )
386
 
 
 
 
 
 
 
387
  return [
388
  datasets.SplitGenerator(
389
  name=datasets.Split.TRAIN,
 
367
  # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
368
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
369
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
370
+
 
 
 
 
 
371
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
372
 
373
  if not os.path.exists(data_dir):
 
379
  )
380
  )
381
 
382
+ patch_files = {}
383
+ if self.config.label_variant == _REVISITED:
384
+ patch_files = dl_manager.download_and_extract(_PATCH_URLs)
385
+ elif self.config.label_variant == _RETACRED:
386
+ patch_files = dl_manager.download_and_extract(_RETACRED_PATCH_URLs)
387
+
388
  return [
389
  datasets.SplitGenerator(
390
  name=datasets.Split.TRAIN,