Update E3C.py
Browse files
E3C.py
CHANGED
|
@@ -286,12 +286,14 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
| 286 |
random.shuffle(ids)
|
| 287 |
random.shuffle(ids)
|
| 288 |
|
| 289 |
-
train, validation = np.split(ids, [int(len(ids)*0.
|
| 290 |
|
| 291 |
if split == "train":
|
| 292 |
allowed_ids = list(train)
|
| 293 |
elif split == "validation":
|
| 294 |
allowed_ids = list(validation)
|
|
|
|
|
|
|
| 295 |
|
| 296 |
for r in all_res:
|
| 297 |
if r["id"] in allowed_ids:
|
|
|
|
| 286 |
random.shuffle(ids)
|
| 287 |
random.shuffle(ids)
|
| 288 |
|
| 289 |
+
train, validation, test = np.split(ids, [int(len(ids)*0.70), int(len(ids)*0.80)])
|
| 290 |
|
| 291 |
if split == "train":
|
| 292 |
allowed_ids = list(train)
|
| 293 |
elif split == "validation":
|
| 294 |
allowed_ids = list(validation)
|
| 295 |
+
elif split == "test":
|
| 296 |
+
allowed_ids = list(test)
|
| 297 |
|
| 298 |
for r in all_res:
|
| 299 |
if r["id"] in allowed_ids:
|