Datasets:

toniwuest commited on
Commit
3c83ab3
·
verified ·
1 Parent(s): b587005

Update CLEVR-Sudoku.py

Browse files
Files changed (1) hide show
  1. CLEVR-Sudoku.py +6 -5
CLEVR-Sudoku.py CHANGED
@@ -86,14 +86,15 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
86
  def _split_generators(self, dl_manager):
87
 
88
  # TODO: define image directory
89
- meta_data_path = dl_manager.download_and_extract(self.config.data_url)
90
 
91
  # archive_path, sudokus, options, labels, attributes = self.get_data(
92
  # dl_manager, self.config.data_url, self.config.image_url
93
  # )
94
 
95
  # Download and extract the dataset archive
96
- archive_path = dl_manager.download_and_extract(self.config.data_url)
 
97
 
98
  print("archive path in split generators")
99
  print(type(archive_path))
@@ -136,10 +137,10 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
136
 
137
  print("generating examples from ", archive_path)
138
 
139
- archive_path = os.path.join(archive_path, "json", "sudoku_0.json")
140
- with open(archive_path, encoding="utf-8") as f:
 
141
  file = json.load(f)
142
-
143
  print(file)
144
 
145
  json_dir = os.path.join(archive_path, "json")
 
86
  def _split_generators(self, dl_manager):
87
 
88
  # TODO: define image directory
89
+ meta_data_path = dl_manager.download_and_extract(self.config.image_url)
90
 
91
  # archive_path, sudokus, options, labels, attributes = self.get_data(
92
  # dl_manager, self.config.data_url, self.config.image_url
93
  # )
94
 
95
  # Download and extract the dataset archive
96
+ # archive_path = dl_manager.download_and_extract(self.config.data_url)
97
+ archive_path = self.config.data_url
98
 
99
  print("archive path in split generators")
100
  print(type(archive_path))
 
137
 
138
  print("generating examples from ", archive_path)
139
 
140
+ json_file = os.path.join(archive_path, "json", "sudoku_0.json")
141
+ json_file = dl_manager.download_and_extract(json_file)
142
+ with open(json_file, encoding="utf-8") as f:
143
  file = json.load(f)
 
144
  print(file)
145
 
146
  json_dir = os.path.join(archive_path, "json")