Datasets:

ArXiv:
License:
Anjaly commited on
Commit
191b0b6
1 Parent(s): f7abfc0
Files changed (1) hide show
  1. snow-mountain.py +23 -110
snow-mountain.py CHANGED
@@ -96,125 +96,38 @@ class Test(datasets.GeneratorBasedBuilder):
96
 
97
  downloaded_files = dl_manager.download(_FILES[self.config.name])
98
 
99
- train_splits = [
100
- datasets.SplitGenerator(
101
- name="train_500",
102
- gen_kwargs={
103
- "filepath": downloaded_files["train_500"],
104
- "dl_manager": dl_manager,
105
- },
106
- ),
107
- datasets.SplitGenerator(
108
- name="train_1000",
109
- gen_kwargs={
110
- "filepath": downloaded_files["train_1000"],
111
- "dl_manager": dl_manager,
112
- },
113
- ),
114
- datasets.SplitGenerator(
115
- name="train_2500",
116
- gen_kwargs={
117
- "filepath": downloaded_files["train_2500"],
118
- "dl_manager": dl_manager,
119
- },
120
- ),
121
- datasets.SplitGenerator(
122
- name="train_short",
123
- gen_kwargs={
124
- "filepath": downloaded_files["train_short"],
125
- "dl_manager": dl_manager,
126
- },
127
- ),
128
- datasets.SplitGenerator(
129
- name="train_full",
130
- gen_kwargs={
131
- "filepath": downloaded_files["train_full"],
132
- "dl_manager": dl_manager,
133
- },
134
- ),
135
- ]
136
 
137
- dev_splits = [
138
- datasets.SplitGenerator(
139
- name="val_500",
140
- gen_kwargs={
141
- "filepath": downloaded_files["val_500"],
142
- "dl_manager": dl_manager,
143
- },
144
- ),
145
  datasets.SplitGenerator(
146
- name="val_1000",
147
  gen_kwargs={
148
- "filepath": downloaded_files["val_1000"],
149
  "dl_manager": dl_manager,
150
  },
151
- ),
 
 
152
  datasets.SplitGenerator(
153
- name="val_2500",
154
  gen_kwargs={
155
- "filepath": downloaded_files["val_2500"],
156
  "dl_manager": dl_manager,
157
  },
158
- ),
159
- datasets.SplitGenerator(
160
- name="val_short",
161
- gen_kwargs={
162
- "filepath": downloaded_files["val_short"],
163
- "dl_manager": dl_manager,
164
- },
165
- ),
166
- datasets.SplitGenerator(
167
- name="val_full",
168
- gen_kwargs={
169
- "filepath": downloaded_files["val_full"],
170
- "dl_manager": dl_manager,
171
- },
172
- ),
173
- ]
174
-
175
- test_splits = [
176
- datasets.SplitGenerator(
177
- name="test_common",
178
- gen_kwargs={
179
- "filepath": downloaded_files["test_common"],
180
- "dl_manager": dl_manager,
181
- },
182
- ),
183
- ]
184
- return train_splits + dev_splits + test_splits
185
-
186
- # data_size = ['500', '1000', '2500', 'short', 'full']
187
-
188
- # splits = []
189
- # for size in data_size:
190
- # splits.append(
191
- # datasets.SplitGenerator(
192
- # name=f"train_{size}",
193
- # gen_kwargs={
194
- # "filepath": downloaded_files[f"train_{size}"],
195
- # "dl_manager": dl_manager,
196
- # },
197
- # )
198
- # )
199
- # splits.append(
200
- # datasets.SplitGenerator(
201
- # name=f"val_{size}",
202
- # gen_kwargs={
203
- # "filepath": downloaded_files[f"val_{size}"],
204
- # "dl_manager": dl_manager,
205
- # },
206
- # )
207
- # )
208
- # splits.append(
209
- # datasets.SplitGenerator(
210
- # name="test_common",
211
- # gen_kwargs={
212
- # "filepath": downloaded_files["test_common"],
213
- # "dl_manager": dl_manager,
214
- # },
215
- # )
216
- # )
217
- # return splits
218
 
219
 
220
  def _generate_examples(self, filepath, dl_manager):
 
96
 
97
  downloaded_files = dl_manager.download(_FILES[self.config.name])
98
 
99
+ data_size = ['500', '1000', '2500', 'short', 'full']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
+ splits = []
102
+ for size in data_size:
103
+ splits.append(
 
 
 
 
 
104
  datasets.SplitGenerator(
105
+ name=f"train_{size}",
106
  gen_kwargs={
107
+ "filepath": downloaded_files[f"train_{size}"],
108
  "dl_manager": dl_manager,
109
  },
110
+ )
111
+ )
112
+ splits.append(
113
  datasets.SplitGenerator(
114
+ name=f"val_{size}",
115
  gen_kwargs={
116
+ "filepath": downloaded_files[f"val_{size}"],
117
  "dl_manager": dl_manager,
118
  },
119
+ )
120
+ )
121
+ splits.append(
122
+ datasets.SplitGenerator(
123
+ name="test_common",
124
+ gen_kwargs={
125
+ "filepath": downloaded_files["test_common"],
126
+ "dl_manager": dl_manager,
127
+ },
128
+ )
129
+ )
130
+ return splits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
 
133
  def _generate_examples(self, filepath, dl_manager):