Datasets:
Tasks:
Question Answering
Modalities:
Text
Sub-tasks:
extractive-qa
Languages:
code
Size:
100K - 1M
License:
Update load script for twostep train and dev
Browse files- codequeries.py +6 -3
codequeries.py
CHANGED
@@ -124,7 +124,9 @@ class Codequeries(datasets.GeneratorBasedBuilder):
|
|
124 |
"relevance_label"],
|
125 |
citation=_CODEQUERIES_CITATION,
|
126 |
data_url={
|
127 |
-
"
|
|
|
|
|
128 |
},
|
129 |
url="https://huggingface.co/datasets/thepurpleowl/codequeries",
|
130 |
),
|
@@ -191,7 +193,7 @@ class Codequeries(datasets.GeneratorBasedBuilder):
|
|
191 |
def _split_generators(self, dl_manager):
|
192 |
dl_dir = dl_manager.download_and_extract(self.config.data_url)
|
193 |
|
194 |
-
if self.config.name in ["prefix", "file_ideal"
|
195 |
return [
|
196 |
datasets.SplitGenerator(
|
197 |
name=datasets.Split.TEST,
|
@@ -227,7 +229,7 @@ class Codequeries(datasets.GeneratorBasedBuilder):
|
|
227 |
]
|
228 |
|
229 |
def _generate_examples(self, filepath, split):
|
230 |
-
if self.config.name in ["prefix", "file_ideal"
|
231 |
assert split == datasets.Split.TEST
|
232 |
logger.info("Generating examples from = %s", filepath)
|
233 |
|
@@ -288,3 +290,4 @@ class Codequeries(datasets.GeneratorBasedBuilder):
|
|
288 |
"label_sequence": row["label_sequence"],
|
289 |
}
|
290 |
key += 1
|
|
|
|
124 |
"relevance_label"],
|
125 |
citation=_CODEQUERIES_CITATION,
|
126 |
data_url={
|
127 |
+
"train": ["twostep_relevance/" + "twostep_relevance_train_" + str(i) + ".json" for i in range(0, 10)]
|
128 |
+
"dev": ["twostep_relevance/" + "twostep_relevance_dev_" + str(i) + ".json" for i in range(0, 2)]
|
129 |
+
"test": ["twostep_relevance/" + "twostep_relevance_test_" + str(i) + ".json" for i in range(0, 10)]
|
130 |
},
|
131 |
url="https://huggingface.co/datasets/thepurpleowl/codequeries",
|
132 |
),
|
|
|
193 |
def _split_generators(self, dl_manager):
|
194 |
dl_dir = dl_manager.download_and_extract(self.config.data_url)
|
195 |
|
196 |
+
if self.config.name in ["prefix", "file_ideal"]:
|
197 |
return [
|
198 |
datasets.SplitGenerator(
|
199 |
name=datasets.Split.TEST,
|
|
|
229 |
]
|
230 |
|
231 |
def _generate_examples(self, filepath, split):
|
232 |
+
if self.config.name in ["prefix", "file_ideal"]:
|
233 |
assert split == datasets.Split.TEST
|
234 |
logger.info("Generating examples from = %s", filepath)
|
235 |
|
|
|
290 |
"label_sequence": row["label_sequence"],
|
291 |
}
|
292 |
key += 1
|
293 |
+
|