Datasets:
Update vtqa2023.py
Browse files- vtqa2023.py +4 -3
vtqa2023.py
CHANGED
|
@@ -104,6 +104,7 @@ class VTQAConfig(datasets.BuilderConfig):
|
|
| 104 |
self.use_cws = use_cws
|
| 105 |
self.local_url = local_url
|
| 106 |
self.get_test_split = get_test_split
|
|
|
|
| 107 |
|
| 108 |
@property
|
| 109 |
def features(self):
|
|
@@ -202,7 +203,7 @@ class VTQA(datasets.GeneratorBasedBuilder):
|
|
| 202 |
|
| 203 |
if self.config.use_cws:
|
| 204 |
cws_supp_dir = _get_url("cws_supp")
|
| 205 |
-
self.cws_supp_dir = cws_supp_dir
|
| 206 |
|
| 207 |
datasets_split = [
|
| 208 |
datasets.SplitGenerator(
|
|
@@ -337,7 +338,7 @@ class VTQA(datasets.GeneratorBasedBuilder):
|
|
| 337 |
if image_type == "all"
|
| 338 |
else image_dict[image_type]
|
| 339 |
),
|
| 340 |
-
"cws_path": self.
|
| 341 |
}
|
| 342 |
else:
|
| 343 |
yield id_, {
|
|
@@ -350,5 +351,5 @@ class VTQA(datasets.GeneratorBasedBuilder):
|
|
| 350 |
if image_type == "all"
|
| 351 |
else image_dict[image_type]
|
| 352 |
),
|
| 353 |
-
"cws_path": self.
|
| 354 |
}
|
|
|
|
| 104 |
self.use_cws = use_cws
|
| 105 |
self.local_url = local_url
|
| 106 |
self.get_test_split = get_test_split
|
| 107 |
+
self.cws_supp_dir = None
|
| 108 |
|
| 109 |
@property
|
| 110 |
def features(self):
|
|
|
|
| 203 |
|
| 204 |
if self.config.use_cws:
|
| 205 |
cws_supp_dir = _get_url("cws_supp")
|
| 206 |
+
self.config.cws_supp_dir = cws_supp_dir
|
| 207 |
|
| 208 |
datasets_split = [
|
| 209 |
datasets.SplitGenerator(
|
|
|
|
| 338 |
if image_type == "all"
|
| 339 |
else image_dict[image_type]
|
| 340 |
),
|
| 341 |
+
"cws_path": self.config.cws_supp_dir,
|
| 342 |
}
|
| 343 |
else:
|
| 344 |
yield id_, {
|
|
|
|
| 351 |
if image_type == "all"
|
| 352 |
else image_dict[image_type]
|
| 353 |
),
|
| 354 |
+
"cws_path": self.config.cws_supp_dir,
|
| 355 |
}
|