baber commited on
Commit
ce34b11
·
1 Parent(s): 535c928

Update testing.py

Browse files
Files changed (1) hide show
  1. testing.py +6 -0
testing.py CHANGED
@@ -16,6 +16,7 @@
16
 
17
  import datasets
18
  import json
 
19
 
20
 
21
  _CITATION = """\
@@ -182,6 +183,11 @@ class LogiQA2(datasets.GeneratorBasedBuilder):
182
  "options": data["options"],
183
  }
184
  elif self.config.name == "logiqa2_nli":
 
 
 
 
 
185
  yield key, {
186
  "label": data["label"],
187
  "major_premise": data["major_premise"],
 
16
 
17
  import datasets
18
  import json
19
+ import ast
20
 
21
 
22
  _CITATION = """\
 
183
  "options": data["options"],
184
  }
185
  elif self.config.name == "logiqa2_nli":
186
+ try:
187
+ data["major_premise"] = ast.literal_eval(data["major_premise"])
188
+ else:
189
+ pass
190
+
191
  yield key, {
192
  "label": data["label"],
193
  "major_premise": data["major_premise"],