Commit
•
5464790
1
Parent(s):
74b57c4
update generator.
Browse files- gaokao_bench.py +30 -30
gaokao_bench.py
CHANGED
@@ -34,7 +34,7 @@ _HOMEPAGE = "https://cevalbenchmark.com"
|
|
34 |
|
35 |
_LICENSE = "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"
|
36 |
|
37 |
-
_URL = r"https://huggingface.co/datasets/AsakusaRinne/
|
38 |
|
39 |
task_list = [
|
40 |
'2010-2013_English_MCQs',
|
@@ -87,35 +87,35 @@ class GaokaoBench(datasets.GeneratorBasedBuilder):
|
|
87 |
citation=_CITATION,
|
88 |
)
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
|
120 |
def _generate_examples(self, filepath):
|
121 |
df = pd.read_csv(filepath,encoding="utf-8")
|
|
|
34 |
|
35 |
_LICENSE = "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"
|
36 |
|
37 |
+
_URL = r"https://huggingface.co/datasets/AsakusaRinne/gaokao_bench/blob/main/gaokao_bench.zip"
|
38 |
|
39 |
task_list = [
|
40 |
'2010-2013_English_MCQs',
|
|
|
87 |
citation=_CITATION,
|
88 |
)
|
89 |
|
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,
|
96 |
+
# gen_kwargs={
|
97 |
+
# "filepath": os.path.join(
|
98 |
+
# data_dir, "test", f"{task_name}_test.csv"
|
99 |
+
# ),
|
100 |
+
# },
|
101 |
+
# ),
|
102 |
+
# datasets.SplitGenerator(
|
103 |
+
# name=datasets.Split("val"),
|
104 |
+
# gen_kwargs={
|
105 |
+
# "filepath": os.path.join(
|
106 |
+
# data_dir, "val", f"{task_name}_val.csv"
|
107 |
+
# ),
|
108 |
+
# },
|
109 |
+
# ),
|
110 |
+
datasets.SplitGenerator(
|
111 |
+
name=datasets.Split("MCQ"),
|
112 |
+
gen_kwargs={
|
113 |
+
"filepath": os.path.join(
|
114 |
+
data_dir, "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")
|