harshakokel commited on
Commit
306bd24
1 Parent(s): c5f53a4

Update acp_bench.py

Browse files
Files changed (1) hide show
  1. acp_bench.py +4 -6
acp_bench.py CHANGED
@@ -64,12 +64,11 @@ class ACP(datasets.GeneratorBasedBuilder):
64
  "question": datasets.Value("string"),
65
  "answer": datasets.Value("string"),
66
  "group": datasets.Value("string"),
67
- "id":datasets.Value("int32")
68
  }
69
- # if 'mcq' in self.config.name:
70
- print(self.config.name)
71
- # features["query"]= datasets.Value("string")
72
- # features["choices"]= datasets.features.Sequence(feature={'text': datasets.Value(dtype='string', id=None), 'label': datasets.Value(dtype='string', id=None)}, length=-1, id=None)
73
  return datasets.DatasetInfo(
74
  description=_DESCRIPTION,
75
  features=datasets.Features(features),
@@ -99,6 +98,5 @@ class ACP(datasets.GeneratorBasedBuilder):
99
  def _generate_examples(self, filepath):
100
  with open(filepath) as f:
101
  examples = json.load(f)
102
-
103
  for i, instance in enumerate(examples):
104
  yield i, instance
 
64
  "question": datasets.Value("string"),
65
  "answer": datasets.Value("string"),
66
  "group": datasets.Value("string"),
67
+ "id": datasets.Value("string")
68
  }
69
+ if 'mcq' in self.config.name:
70
+ features["query"]= datasets.Value("string")
71
+ features["choices"]= datasets.features.Sequence(feature={'text': datasets.Value(dtype='string', id=None), 'label': datasets.Value(dtype='string', id=None)}, length=-1, id=None)
 
72
  return datasets.DatasetInfo(
73
  description=_DESCRIPTION,
74
  features=datasets.Features(features),
 
98
  def _generate_examples(self, filepath):
99
  with open(filepath) as f:
100
  examples = json.load(f)
 
101
  for i, instance in enumerate(examples):
102
  yield i, instance