mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Update] Update Math auto-download data (#1700)
This commit is contained in:
parent
98242ff1d1
commit
ab8fdbbaab
@ -1,4 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from os import environ
|
||||
|
||||
@ -140,7 +141,7 @@ def extract_answer(response_text: str):
|
||||
class MATHDataset(BaseDataset):
|
||||
|
||||
@staticmethod
|
||||
def load(path: str):
|
||||
def load(path: str, file_name: str = 'math.json'):
|
||||
path = get_data_path(path)
|
||||
dataset = DatasetDict()
|
||||
raw_data = []
|
||||
@ -155,7 +156,8 @@ class MATHDataset(BaseDataset):
|
||||
extract_boxed_answer(item['solution'])
|
||||
})
|
||||
else:
|
||||
data = json.load(open(path))
|
||||
file_path = os.path.join(path, file_name)
|
||||
data = json.load(open(file_path))
|
||||
for i in data.keys():
|
||||
raw_data.append({
|
||||
'problem':
|
||||
|
@ -167,7 +167,7 @@ DATASETS_MAPPING = {
|
||||
"opencompass/math": {
|
||||
"ms_id": "opencompass/math",
|
||||
"hf_id": "opencompass/math",
|
||||
"local": "./data/math/math.json",
|
||||
"local": "./data/math/",
|
||||
},
|
||||
# MMLU
|
||||
"opencompass/mmlu": {
|
||||
@ -327,11 +327,11 @@ DATASETS_MAPPING = {
|
||||
"hf_id": "",
|
||||
"local": "./data/mmmlu_lite",
|
||||
},
|
||||
"opencompass/musr": {
|
||||
"opencompass/musr": {
|
||||
"ms_id": "",
|
||||
"hf_id": "",
|
||||
"local": "./data/musr",
|
||||
},
|
||||
},
|
||||
"opencompass/babilong": {
|
||||
"ms_id": "",
|
||||
"hf_id": "",
|
||||
@ -374,7 +374,7 @@ DATASETS_URL = {
|
||||
},
|
||||
"/math/": {
|
||||
"url": "http://opencompass.oss-cn-shanghai.aliyuncs.com/datasets/data/math.zip",
|
||||
"md5": "8b1b897259684672055e6fd4fc07c808",
|
||||
"md5": "cb5b4c8378085929e20345174e731fdf",
|
||||
},
|
||||
"/hellaswag/": {
|
||||
"url": "http://opencompass.oss-cn-shanghai.aliyuncs.com/datasets/data/hellaswag.zip",
|
||||
@ -540,8 +540,8 @@ DATASETS_URL = {
|
||||
"url": "http://opencompass.oss-cn-shanghai.aliyuncs.com/datasets/data/WikiBench.zip",
|
||||
"md5": "6dac1d1a3133fe1effff185cbf71d928",
|
||||
},
|
||||
"/babilong":{
|
||||
"/babilong": {
|
||||
"url": "http://opencompass.oss-cn-shanghai.aliyuncs.com/datasets/data/babilong.zip",
|
||||
"md5": "e400864c31bc58d29eaa3e199751f99b",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user