fixed path
Browse files- newshead.py +4 -3
newshead.py
CHANGED
@@ -17,25 +17,26 @@ class NewsHeadDataset(datasets.GeneratorBasedBuilder):
|
|
17 |
)
|
18 |
|
19 |
def _split_generators(self, dl_manager: DownloadManager):
|
|
|
20 |
return [
|
21 |
datasets.SplitGenerator(
|
22 |
name=datasets.Split.TRAIN,
|
23 |
gen_kwargs = {
|
24 |
-
"filepath": os.path.join(
|
25 |
"split": "train"
|
26 |
}
|
27 |
),
|
28 |
datasets.SplitGenerator(
|
29 |
name=datasets.Split.VALIDATION,
|
30 |
gen_kwargs = {
|
31 |
-
"filepath": os.path.join(
|
32 |
"split": "validation"
|
33 |
}
|
34 |
),
|
35 |
datasets.SplitGenerator(
|
36 |
name=datasets.Split.TEST,
|
37 |
gen_kwargs = {
|
38 |
-
"filepath": os.path.join(
|
39 |
"split": "test"
|
40 |
}
|
41 |
)
|
|
|
17 |
)
|
18 |
|
19 |
def _split_generators(self, dl_manager: DownloadManager):
|
20 |
+
data_dir = dl_manager.download_and_extract(_URL)
|
21 |
return [
|
22 |
datasets.SplitGenerator(
|
23 |
name=datasets.Split.TRAIN,
|
24 |
gen_kwargs = {
|
25 |
+
"filepath": os.path.join(data_dir, "data", "train.jsonl"),
|
26 |
"split": "train"
|
27 |
}
|
28 |
),
|
29 |
datasets.SplitGenerator(
|
30 |
name=datasets.Split.VALIDATION,
|
31 |
gen_kwargs = {
|
32 |
+
"filepath": os.path.join(data_dir, "data", "validation.jsonl"),
|
33 |
"split": "validation"
|
34 |
}
|
35 |
),
|
36 |
datasets.SplitGenerator(
|
37 |
name=datasets.Split.TEST,
|
38 |
gen_kwargs = {
|
39 |
+
"filepath": os.path.join(data_dir, "data", "validation.jsonl"),
|
40 |
"split": "test"
|
41 |
}
|
42 |
)
|