AsakusaRinne commited on
Commit
129483c
·
1 Parent(s): 7f5feb8

update generator

Browse files
Files changed (1) hide show
  1. gaokao_bench.py +1 -5
gaokao_bench.py CHANGED
@@ -90,9 +90,6 @@ class GaokaoBench(datasets.GeneratorBasedBuilder):
90
  def _split_generators(self, dl_manager):
91
  data_dir = dl_manager.download_and_extract(_URL)
92
  task_name = self.config.name
93
- print('===============================')
94
- print(data_dir)
95
- print('===============================')
96
  return [
97
  # datasets.SplitGenerator(
98
  # name=datasets.Split.TEST,
@@ -114,14 +111,13 @@ class GaokaoBench(datasets.GeneratorBasedBuilder):
114
  name=datasets.Split.TRAIN,
115
  gen_kwargs={
116
  "filepath": os.path.join(
117
- data_dir, 'gaokao_bench', 'Multiple-choice_Questions'
118
  )
119
  },
120
  ),
121
  ]
122
 
123
  def _generate_examples(self, filepath):
124
- print(filepath)
125
  df = pd.read_csv(filepath,encoding="utf-8")
126
  for i, instance in enumerate(df.to_dict(orient="records")):
127
  if "answer" not in instance.keys():
 
90
  def _split_generators(self, dl_manager):
91
  data_dir = dl_manager.download_and_extract(_URL)
92
  task_name = self.config.name
 
 
 
93
  return [
94
  # datasets.SplitGenerator(
95
  # name=datasets.Split.TEST,
 
111
  name=datasets.Split.TRAIN,
112
  gen_kwargs={
113
  "filepath": os.path.join(
114
+ data_dir, 'gaokao_bench/Multiple-choice_Questions', f'{task_name}.csv'
115
  )
116
  },
117
  ),
118
  ]
119
 
120
  def _generate_examples(self, filepath):
 
121
  df = pd.read_csv(filepath,encoding="utf-8")
122
  for i, instance in enumerate(df.to_dict(orient="records")):
123
  if "answer" not in instance.keys():