epishchik commited on
Commit
c02b476
1 Parent(s): 9356f36

helpful comments

Browse files
Files changed (1) hide show
  1. super-resolution-games.py +6 -0
super-resolution-games.py CHANGED
@@ -319,6 +319,7 @@ _DATA_FILES_GAME_ENGINE = {
319
  }
320
  }
321
 
 
322
  _DATA_FILES_GAME_ENGINE_KEYS = list(_DATA_FILES_GAME_ENGINE.keys())
323
  _DATA_FILES_GAME_ENGINE['GameEngine_All'] = {
324
  'train': {
@@ -404,6 +405,7 @@ _DATA_FILES_DOWNSCALE = {
404
  }
405
  }
406
 
 
407
  _DATA_FILES_DOWNSCALE_KEYS = list(_DATA_FILES_DOWNSCALE.keys())
408
  _DATA_FILES_DOWNSCALE['Downscale_All'] = {
409
  'train': {
@@ -482,6 +484,7 @@ class SuperResolutionGames(datasets.GeneratorBasedBuilder):
482
  train_archives_downloaded = {}
483
  for k in train_archives.keys():
484
  train_archives_k = train_archives[k]
 
485
  if isinstance(train_archives_k, str):
486
  train_archives_downloaded[k] = \
487
  dl_manager.download(train_archives_k)
@@ -496,6 +499,7 @@ class SuperResolutionGames(datasets.GeneratorBasedBuilder):
496
  val_archives_downloaded = {}
497
  for k in val_archives.keys():
498
  val_archives_k = val_archives[k]
 
499
  if isinstance(val_archives_k, str):
500
  val_archives_downloaded[k] = \
501
  dl_manager.download(val_archives_k)
@@ -510,6 +514,7 @@ class SuperResolutionGames(datasets.GeneratorBasedBuilder):
510
  train_gen_kwargs = {}
511
  for k in train_archives_downloaded.keys():
512
  train_archives_downloaded_k = train_archives_downloaded[k]
 
513
  if isinstance(train_archives_downloaded_k, list):
514
  train_gen_kwargs[k] = chain.from_iterable([
515
  dl_manager.iter_archive(train_archives_downloaded_k[i]) \
@@ -522,6 +527,7 @@ class SuperResolutionGames(datasets.GeneratorBasedBuilder):
522
  val_gen_kwargs = {}
523
  for k in val_archives_downloaded.keys():
524
  val_archives_downloaded_k = val_archives_downloaded[k]
 
525
  if isinstance(val_archives_downloaded_k, list):
526
  val_gen_kwargs[k] = chain.from_iterable([
527
  dl_manager.iter_archive(val_archives_downloaded_k[i]) \
 
319
  }
320
  }
321
 
322
+ # we need to form lists with same resolutions to get all project at once
323
  _DATA_FILES_GAME_ENGINE_KEYS = list(_DATA_FILES_GAME_ENGINE.keys())
324
  _DATA_FILES_GAME_ENGINE['GameEngine_All'] = {
325
  'train': {
 
405
  }
406
  }
407
 
408
+ # we need to form lists with same resolutions to get all project at once
409
  _DATA_FILES_DOWNSCALE_KEYS = list(_DATA_FILES_DOWNSCALE.keys())
410
  _DATA_FILES_DOWNSCALE['Downscale_All'] = {
411
  'train': {
 
484
  train_archives_downloaded = {}
485
  for k in train_archives.keys():
486
  train_archives_k = train_archives[k]
487
+ # str - single project, list - all GameEngine / Downscale projects
488
  if isinstance(train_archives_k, str):
489
  train_archives_downloaded[k] = \
490
  dl_manager.download(train_archives_k)
 
499
  val_archives_downloaded = {}
500
  for k in val_archives.keys():
501
  val_archives_k = val_archives[k]
502
+ # str - single project, list - all GameEngine / Downscale projects
503
  if isinstance(val_archives_k, str):
504
  val_archives_downloaded[k] = \
505
  dl_manager.download(val_archives_k)
 
514
  train_gen_kwargs = {}
515
  for k in train_archives_downloaded.keys():
516
  train_archives_downloaded_k = train_archives_downloaded[k]
517
+ # str - single project, list - all GameEngine / Downscale projects
518
  if isinstance(train_archives_downloaded_k, list):
519
  train_gen_kwargs[k] = chain.from_iterable([
520
  dl_manager.iter_archive(train_archives_downloaded_k[i]) \
 
527
  val_gen_kwargs = {}
528
  for k in val_archives_downloaded.keys():
529
  val_archives_downloaded_k = val_archives_downloaded[k]
530
+ # str - single project, list - all GameEngine / Downscale projects
531
  if isinstance(val_archives_downloaded_k, list):
532
  val_gen_kwargs[k] = chain.from_iterable([
533
  dl_manager.iter_archive(val_archives_downloaded_k[i]) \