Commit
·
1189b51
1
Parent(s):
f2cade2
Fix TimeoutError (#8)
Browse files- Pass URLs to download as a list (32ec0e0835622d7eefa05290045b2d88203aeef5)
P3.py
CHANGED
|
@@ -80,9 +80,9 @@ def load_cached_task(features_dict, tfrecord):
|
|
| 80 |
|
| 81 |
_URLs = {
|
| 82 |
task_name: {
|
| 83 |
-
split_name:
|
| 84 |
-
|
| 85 |
-
|
| 86 |
for split_name in splits_and_features_dict["splits"]
|
| 87 |
}
|
| 88 |
for task_name, splits_and_features_dict in _TASK_SPLITS_AND_FEATURES_DICT.items()
|
|
@@ -159,7 +159,7 @@ class P3(datasets.GeneratorBasedBuilder):
|
|
| 159 |
datasets.SplitGenerator(
|
| 160 |
name=datasets.Split.TRAIN,
|
| 161 |
gen_kwargs={
|
| 162 |
-
"tfrecord": data_dir[task_name][split_name][
|
| 163 |
}
|
| 164 |
)
|
| 165 |
)
|
|
@@ -169,7 +169,7 @@ class P3(datasets.GeneratorBasedBuilder):
|
|
| 169 |
datasets.SplitGenerator(
|
| 170 |
name=datasets.Split.VALIDATION,
|
| 171 |
gen_kwargs={
|
| 172 |
-
"tfrecord": data_dir[task_name][split_name][
|
| 173 |
}
|
| 174 |
)
|
| 175 |
)
|
|
@@ -179,7 +179,7 @@ class P3(datasets.GeneratorBasedBuilder):
|
|
| 179 |
datasets.SplitGenerator(
|
| 180 |
name=datasets.Split.TEST,
|
| 181 |
gen_kwargs={
|
| 182 |
-
"tfrecord": data_dir[task_name][split_name][
|
| 183 |
}
|
| 184 |
)
|
| 185 |
)
|
|
@@ -190,7 +190,7 @@ class P3(datasets.GeneratorBasedBuilder):
|
|
| 190 |
datasets.SplitGenerator(
|
| 191 |
name=datasets.Split(special_split_name),
|
| 192 |
gen_kwargs={
|
| 193 |
-
"tfrecord": data_dir[task_name][special_split_name][
|
| 194 |
}
|
| 195 |
)
|
| 196 |
)
|
|
|
|
| 80 |
|
| 81 |
_URLs = {
|
| 82 |
task_name: {
|
| 83 |
+
split_name: [
|
| 84 |
+
f"{_DATA_PATH}/{task_name}/{split_name}.tfrecord-00000-of-00001", # TODO -> handle multiple shards
|
| 85 |
+
]
|
| 86 |
for split_name in splits_and_features_dict["splits"]
|
| 87 |
}
|
| 88 |
for task_name, splits_and_features_dict in _TASK_SPLITS_AND_FEATURES_DICT.items()
|
|
|
|
| 159 |
datasets.SplitGenerator(
|
| 160 |
name=datasets.Split.TRAIN,
|
| 161 |
gen_kwargs={
|
| 162 |
+
"tfrecord": data_dir[task_name][split_name][0],
|
| 163 |
}
|
| 164 |
)
|
| 165 |
)
|
|
|
|
| 169 |
datasets.SplitGenerator(
|
| 170 |
name=datasets.Split.VALIDATION,
|
| 171 |
gen_kwargs={
|
| 172 |
+
"tfrecord": data_dir[task_name][split_name][0],
|
| 173 |
}
|
| 174 |
)
|
| 175 |
)
|
|
|
|
| 179 |
datasets.SplitGenerator(
|
| 180 |
name=datasets.Split.TEST,
|
| 181 |
gen_kwargs={
|
| 182 |
+
"tfrecord": data_dir[task_name][split_name][0],
|
| 183 |
}
|
| 184 |
)
|
| 185 |
)
|
|
|
|
| 190 |
datasets.SplitGenerator(
|
| 191 |
name=datasets.Split(special_split_name),
|
| 192 |
gen_kwargs={
|
| 193 |
+
"tfrecord": data_dir[task_name][special_split_name][0],
|
| 194 |
}
|
| 195 |
)
|
| 196 |
)
|