rbawden commited on
Commit
299e9f0
·
verified ·
1 Parent(s): 264f28d

Update DiscEvalMT.py

Browse files
Files changed (1) hide show
  1. DiscEvalMT.py +8 -0
DiscEvalMT.py CHANGED
@@ -86,3 +86,11 @@ class DiscEvalMT(datasets.GeneratorBasedBuilder):
86
  return datasets.SplitGenerator(name="test", gen_kwargs={'filepath': downloaded_files['test-' + self.config.evaltype]}),
87
 
88
 
 
 
 
 
 
 
 
 
 
86
  return datasets.SplitGenerator(name="test", gen_kwargs={'filepath': downloaded_files['test-' + self.config.evaltype]}),
87
 
88
 
89
+ def _generate_examples(self, filepath):
90
+ logger.info("generating examples from = %s", filepath)
91
+ key = 0
92
+ with open(filepath, encoding="utf-8") as f:
93
+ examples = json.load(f)
94
+ for line in f:
95
+ example = json.load(line)
96
+ yield example['ex_num'], example