Update agieval.py
Browse files- agieval.py +42 -33
agieval.py
CHANGED
|
@@ -41,37 +41,51 @@ _LICENSE = (
|
|
| 41 |
"Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"
|
| 42 |
)
|
| 43 |
HEAD= 'https://raw.githubusercontent.com/microsoft/AGIEval/main/data/v1/'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
_URLS = {
|
| 46 |
-
|
| 47 |
-
"test": HEAD+'
|
| 48 |
-
}
|
| 49 |
-
"sat_math": {
|
| 50 |
-
"test": HEAD+'sat-math.jsonl'
|
| 51 |
-
},
|
| 52 |
-
"lsat_ar": {
|
| 53 |
-
"test": HEAD+'lsat-ar.jsonl'
|
| 54 |
-
},
|
| 55 |
-
"lsat_lr": {
|
| 56 |
-
"test": HEAD+'lsat-lr.jsonl'
|
| 57 |
-
},
|
| 58 |
-
"lsat_rc": {
|
| 59 |
-
"test": HEAD+'lsat-rc.jsonl'
|
| 60 |
-
},
|
| 61 |
-
"logiqa": {
|
| 62 |
-
"test": HEAD+'logiqa-en.jsonl'
|
| 63 |
-
},
|
| 64 |
-
"aqua_rat": {
|
| 65 |
-
"test": HEAD+'aqua-rat.jsonl'
|
| 66 |
-
},
|
| 67 |
-
'math_agieval': {
|
| 68 |
-
"test": HEAD+'math.jsonl'
|
| 69 |
-
},
|
| 70 |
-
'few_shot': {
|
| 71 |
-
'few_shot':'https://raw.githubusercontent.com/microsoft/AGIEval/main/data/few_shot_prompts.csv'
|
| 72 |
-
}
|
| 73 |
|
| 74 |
}
|
|
|
|
| 75 |
|
| 76 |
|
| 77 |
class AgiEval(datasets.GeneratorBasedBuilder):
|
|
@@ -112,12 +126,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
| 112 |
description="",
|
| 113 |
),
|
| 114 |
datasets.BuilderConfig(
|
| 115 |
-
name="
|
| 116 |
-
version=VERSION,
|
| 117 |
-
description="",
|
| 118 |
-
),
|
| 119 |
-
datasets.BuilderConfig(
|
| 120 |
-
name="math_agieval",
|
| 121 |
version=VERSION,
|
| 122 |
description="",
|
| 123 |
),
|
|
|
|
| 41 |
"Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"
|
| 42 |
)
|
| 43 |
HEAD= 'https://raw.githubusercontent.com/microsoft/AGIEval/main/data/v1/'
|
| 44 |
+
english_qa_datasets = ["lsat-ar", "lsat-lr", "lsat-rc", "logiqa-en", "sat-math", "sat-en", "aqua-rat",
|
| 45 |
+
"sat-en-without-passage", "gaokao-english"]
|
| 46 |
+
chinese_qa_datasets = ["logiqa-zh", "jec-qa-kd", "jec-qa-ca", "gaokao-chinese", "gaokao-geography", "gaokao-history",
|
| 47 |
+
"gaokao-biology", "gaokao-chemistry", "gaokao-physics", "gaokao-mathqa"]
|
| 48 |
+
english_cloze_datasets = ["math"]
|
| 49 |
+
chinese_cloze_datasets = ["gaokao-mathcloze"]
|
| 50 |
+
all_lst = english_qa_datasets + chinese_qa_datasets + english_cloze_datasets + chinese_cloze_datasets
|
| 51 |
|
| 52 |
+
# _URLS = {
|
| 53 |
+
# "sat_en": {
|
| 54 |
+
# "test": HEAD+'sat-en.jsonl',
|
| 55 |
+
# },
|
| 56 |
+
# "sat_math": {
|
| 57 |
+
# "test": HEAD+'sat-math.jsonl'
|
| 58 |
+
# },
|
| 59 |
+
# "lsat_ar": {
|
| 60 |
+
# "test": HEAD+'lsat-ar.jsonl'
|
| 61 |
+
# },
|
| 62 |
+
# "lsat_lr": {
|
| 63 |
+
# "test": HEAD+'lsat-lr.jsonl'
|
| 64 |
+
# },
|
| 65 |
+
# "lsat_rc": {
|
| 66 |
+
# "test": HEAD+'lsat-rc.jsonl'
|
| 67 |
+
# },
|
| 68 |
+
# "logiqa": {
|
| 69 |
+
# "test": HEAD+'logiqa-en.jsonl'
|
| 70 |
+
# },
|
| 71 |
+
# "aqua_rat": {
|
| 72 |
+
# "test": HEAD+'aqua-rat.jsonl'
|
| 73 |
+
# },
|
| 74 |
+
# 'math_agieval': {
|
| 75 |
+
# "test": HEAD+'math.jsonl'
|
| 76 |
+
# },
|
| 77 |
+
# 'few_shot': {
|
| 78 |
+
# 'few_shot':'https://raw.githubusercontent.com/microsoft/AGIEval/main/data/few_shot_prompts.csv'
|
| 79 |
+
# }
|
| 80 |
+
|
| 81 |
+
# }
|
| 82 |
_URLS = {
|
| 83 |
+
e: {
|
| 84 |
+
"test": HEAD+e+'.jsonl',
|
| 85 |
+
} for e in all_lst
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
}
|
| 88 |
+
_URLS['few_shot'] ={'few_shot':'https://raw.githubusercontent.com/microsoft/AGIEval/main/data/few_shot_prompts.csv'}
|
| 89 |
|
| 90 |
|
| 91 |
class AgiEval(datasets.GeneratorBasedBuilder):
|
|
|
|
| 126 |
description="",
|
| 127 |
),
|
| 128 |
datasets.BuilderConfig(
|
| 129 |
+
name="math",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
version=VERSION,
|
| 131 |
description="",
|
| 132 |
),
|