Chester Palen-Michel
commited on
Commit
•
b528675
1
Parent(s):
f74696d
Change to loading script
Browse files
lr-sum.py
CHANGED
@@ -122,24 +122,24 @@ class Lrsum(datasets.GeneratorBasedBuilder):
|
|
122 |
datasets.SplitGenerator(
|
123 |
name=datasets.Split.TEST,
|
124 |
gen_kwargs={
|
125 |
-
"filepath": os.path.join(data_dir, lang + "_test.jsonl"),
|
126 |
},
|
127 |
)
|
128 |
]
|
129 |
-
if os.path.exists(os.path.join(data_dir, lang + "_train.jsonl")):
|
130 |
ret.append(datasets.SplitGenerator(
|
131 |
name=datasets.Split.TRAIN,
|
132 |
gen_kwargs={
|
133 |
-
"filepath": os.path.join(data_dir, lang + "_train.jsonl"),
|
134 |
},
|
135 |
)
|
136 |
)
|
137 |
-
if os.path.exists(os.path.join(data_dir, lang + "_val.jsonl")):
|
138 |
ret.append(
|
139 |
datasets.SplitGenerator(
|
140 |
name=datasets.Split.VALIDATION,
|
141 |
gen_kwargs={
|
142 |
-
"filepath": os.path.join(data_dir, lang + "_val.jsonl"),
|
143 |
},
|
144 |
)
|
145 |
)
|
|
|
122 |
datasets.SplitGenerator(
|
123 |
name=datasets.Split.TEST,
|
124 |
gen_kwargs={
|
125 |
+
"filepath": os.path.join(data_dir, lang, lang + "_test.jsonl"),
|
126 |
},
|
127 |
)
|
128 |
]
|
129 |
+
if os.path.exists(os.path.join(data_dir, lang, lang + "_train.jsonl")):
|
130 |
ret.append(datasets.SplitGenerator(
|
131 |
name=datasets.Split.TRAIN,
|
132 |
gen_kwargs={
|
133 |
+
"filepath": os.path.join(data_dir, lang, lang + "_train.jsonl"),
|
134 |
},
|
135 |
)
|
136 |
)
|
137 |
+
if os.path.exists(os.path.join(data_dir, lang, lang + "_val.jsonl")):
|
138 |
ret.append(
|
139 |
datasets.SplitGenerator(
|
140 |
name=datasets.Split.VALIDATION,
|
141 |
gen_kwargs={
|
142 |
+
"filepath": os.path.join(data_dir, lang, lang + "_val.jsonl"),
|
143 |
},
|
144 |
)
|
145 |
)
|