Update CLEVR-Sudoku.py
Browse files- CLEVR-Sudoku.py +5 -4
CLEVR-Sudoku.py
CHANGED
@@ -98,14 +98,11 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
|
|
98 |
print("archive path in split generators")
|
99 |
print(type(archive_path))
|
100 |
|
101 |
-
archive_path_iter_archive = dl_manager.iter_archive(archive_path)
|
102 |
-
print(type(archive_path_iter_archive))
|
103 |
-
|
104 |
# Define the dataset splits
|
105 |
return [
|
106 |
datasets.SplitGenerator(
|
107 |
name=datasets.Split.TRAIN,
|
108 |
-
gen_kwargs={"archive_path":
|
109 |
)
|
110 |
]
|
111 |
|
@@ -137,6 +134,10 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
|
|
137 |
print("archive path in generate examples")
|
138 |
print(type(archive_path))
|
139 |
|
|
|
|
|
|
|
|
|
140 |
for i, (file_path, file_obj) in enumerate(archive_path):
|
141 |
print(file_path)
|
142 |
if file_path.startswith("json/") and file_path.endswith(".json"):
|
|
|
98 |
print("archive path in split generators")
|
99 |
print(type(archive_path))
|
100 |
|
|
|
|
|
|
|
101 |
# Define the dataset splits
|
102 |
return [
|
103 |
datasets.SplitGenerator(
|
104 |
name=datasets.Split.TRAIN,
|
105 |
+
gen_kwargs={"archive_path": archive_path, "dl_manager": dl_manager}
|
106 |
)
|
107 |
]
|
108 |
|
|
|
134 |
print("archive path in generate examples")
|
135 |
print(type(archive_path))
|
136 |
|
137 |
+
logger.info("generating examples from = %s", archive_path)
|
138 |
+
with open(archive_path) as f:
|
139 |
+
file = json.load(f)
|
140 |
+
|
141 |
for i, (file_path, file_obj) in enumerate(archive_path):
|
142 |
print(file_path)
|
143 |
if file_path.startswith("json/") and file_path.endswith(".json"):
|