Update cc-100-01-percent.py
Browse files- cc-100-01-percent.py +6 -0
cc-100-01-percent.py
CHANGED
@@ -717,9 +717,11 @@ class MyDataset(datasets.GeneratorBasedBuilder):
|
|
717 |
def _split_generators(self, dl_manager):
|
718 |
train_url = "train.txt"
|
719 |
test_url = "test.txt"
|
|
|
720 |
|
721 |
train_path = dl_manager.download(os.path.join(self.config.data_dir, train_url))
|
722 |
test_path = dl_manager.download(os.path.join(self.config.data_dir, test_url))
|
|
|
723 |
|
724 |
return [
|
725 |
datasets.SplitGenerator(
|
@@ -730,6 +732,10 @@ class MyDataset(datasets.GeneratorBasedBuilder):
|
|
730 |
name=datasets.Split.TEST,
|
731 |
gen_kwargs={"filepath": test_path},
|
732 |
),
|
|
|
|
|
|
|
|
|
733 |
]
|
734 |
|
735 |
def _generate_examples(self, filepath):
|
|
|
717 |
def _split_generators(self, dl_manager):
|
718 |
train_url = "train.txt"
|
719 |
test_url = "test.txt"
|
720 |
+
valid_url = "valid.txt"
|
721 |
|
722 |
train_path = dl_manager.download(os.path.join(self.config.data_dir, train_url))
|
723 |
test_path = dl_manager.download(os.path.join(self.config.data_dir, test_url))
|
724 |
+
valid_path = dl_manager.download(os.path.join(self.config.data_dir, valid_url))
|
725 |
|
726 |
return [
|
727 |
datasets.SplitGenerator(
|
|
|
732 |
name=datasets.Split.TEST,
|
733 |
gen_kwargs={"filepath": test_path},
|
734 |
),
|
735 |
+
datasets.SplitGenerator(
|
736 |
+
name=datasets.Split.VALID,
|
737 |
+
gen_kwargs={"filepath": valid_path},
|
738 |
+
),
|
739 |
]
|
740 |
|
741 |
def _generate_examples(self, filepath):
|