mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00

* Support OlympiadBench Benchmark * Support OlympiadBench Benchmark * Support OlympiadBench Benchmark * update dataset path * Update olmpiadBench * Update olmpiadBench * Update olmpiadBench * Add HLE dataset * Add HLE dataset * Add HLE dataset --------- Co-authored-by: sudanl <sudanl@foxmail.com>
18 lines
480 B
Python
18 lines
480 B
Python
from datasets import load_dataset
|
|
|
|
from opencompass.registry import LOAD_DATASET
|
|
|
|
from .base import BaseDataset
|
|
|
|
|
|
@LOAD_DATASET.register_module()
|
|
class HLEDataset(BaseDataset):
|
|
|
|
@staticmethod
|
|
def load(path: str):
|
|
dataset = load_dataset(path)
|
|
dataset['test'] = dataset['test'].filter(lambda x: x['image'] == '')
|
|
dataset['test'] = dataset['test'].rename_column('question', 'problem')
|
|
dataset['train'] = dataset['test']
|
|
return dataset
|