Commit ·
cefd6b9
1
Parent(s): 76c9e67
Update testdataset.py
Browse files- testdataset.py +3 -15
testdataset.py
CHANGED
|
@@ -140,18 +140,6 @@ class MedNLIDataset(datasets.GeneratorBasedBuilder):
|
|
| 140 |
|
| 141 |
def _generate_examples(self, filepath, split: str) -> Tuple[int, Dict]:
|
| 142 |
with open(filepath, "r") as f:
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
yield row
|
| 147 |
-
|
| 148 |
-
# elif self.config.schema == "bigbio_te":
|
| 149 |
-
# for line in f:
|
| 150 |
-
# json_line = json.loads(line)
|
| 151 |
-
# entailment_example = {
|
| 152 |
-
# "id": json_line["pairID"],
|
| 153 |
-
# "premise": json_line["sentence1"],
|
| 154 |
-
# "hypothesis": json_line["sentence2"],
|
| 155 |
-
# "label": json_line["gold_label"],
|
| 156 |
-
# }
|
| 157 |
-
# yield json_line["pairID"], entailment_example
|
|
|
|
| 140 |
|
| 141 |
def _generate_examples(self, filepath, split: str) -> Tuple[int, Dict]:
|
| 142 |
with open(filepath, "r") as f:
|
| 143 |
+
test = csv.reader(f)
|
| 144 |
+
for row in test:
|
| 145 |
+
yield row
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|