Commit
·
6a847f2
1
Parent(s):
bb87d1f
feat
Browse files- VieGLUE.py +3 -3
VieGLUE.py
CHANGED
@@ -490,7 +490,7 @@ class VNExpress(datasets.GeneratorBasedBuilder):
|
|
490 |
return return_datasets
|
491 |
|
492 |
def _generate_examples(self, files, urls, stage, config):
|
493 |
-
|
494 |
features = config.text_features
|
495 |
print(config)
|
496 |
print(features)
|
@@ -510,8 +510,8 @@ class VNExpress(datasets.GeneratorBasedBuilder):
|
|
510 |
print(f"Loaded {len(all_samples)} samples from {file_path}")
|
511 |
print(f"Sample: {all_samples[0]}")
|
512 |
for sample in all_samples:
|
513 |
-
yield {
|
514 |
-
"idx":
|
515 |
"label": sample["label"],
|
516 |
**{f: sample[f] for f in features},
|
517 |
}
|
|
|
490 |
return return_datasets
|
491 |
|
492 |
def _generate_examples(self, files, urls, stage, config):
|
493 |
+
id_ = 0
|
494 |
features = config.text_features
|
495 |
print(config)
|
496 |
print(features)
|
|
|
510 |
print(f"Loaded {len(all_samples)} samples from {file_path}")
|
511 |
print(f"Sample: {all_samples[0]}")
|
512 |
for sample in all_samples:
|
513 |
+
yield id_, {
|
514 |
+
"idx": id_,
|
515 |
"label": sample["label"],
|
516 |
**{f: sample[f] for f in features},
|
517 |
}
|