Datasets:
Matej Klemen
commited on
Commit
•
0fe11c2
1
Parent(s):
3b1ddfa
Move the option to load custom test set to _split_generators
Browse files
si_nli.py
CHANGED
@@ -88,17 +88,14 @@ class SINLI(datasets.GeneratorBasedBuilder):
|
|
88 |
datasets.SplitGenerator(
|
89 |
name=datasets.Split.TEST,
|
90 |
gen_kwargs={
|
91 |
-
|
|
|
92 |
"split": "test"
|
93 |
}
|
94 |
)
|
95 |
]
|
96 |
|
97 |
def _generate_examples(self, file_path, split):
|
98 |
-
if split == "test":
|
99 |
-
# Allow the user to load the private test set with this script if they have access to it
|
100 |
-
file_path = os.getenv("SI_NLI_TEST_PATH", file_path)
|
101 |
-
|
102 |
with open(file_path, encoding="utf-8") as f:
|
103 |
reader = csv.reader(f, delimiter="\t", quotechar='"')
|
104 |
header = next(reader)
|
|
|
88 |
datasets.SplitGenerator(
|
89 |
name=datasets.Split.TEST,
|
90 |
gen_kwargs={
|
91 |
+
# Allow the user to load the private test set with this script if they have access to it
|
92 |
+
"file_path": os.getenv("SI_NLI_TEST_PATH", os.path.join(data_dir, "SI-NLI", "test.tsv")),
|
93 |
"split": "test"
|
94 |
}
|
95 |
)
|
96 |
]
|
97 |
|
98 |
def _generate_examples(self, file_path, split):
|
|
|
|
|
|
|
|
|
99 |
with open(file_path, encoding="utf-8") as f:
|
100 |
reader = csv.reader(f, delimiter="\t", quotechar='"')
|
101 |
header = next(reader)
|