OpenCompass/opencompass/datasets/huggingface.py
Songyang Zhang 46cc7894e1
[Feature] Support import configs/models/summarizers from whl (#1376)
* [Feature] Support import configs/models/summarizers from whl

* Update LCBench configs

* Update

* Update

* Update

* Update

* update

* Update

* Update

* Update

* Update

* Update
2024-08-01 00:42:48 +08:00

19 lines
474 B
Python

from datasets import load_dataset
from opencompass.registry import LOAD_DATASET
from opencompass.utils import get_data_path
from .base import BaseDataset
@LOAD_DATASET.register_module()
class HFDataset(BaseDataset):
@staticmethod
def load(**kwargs):
if 'data_files' in kwargs:
kwargs['data_files'] = get_data_path(kwargs['data_files'],
local_mode=True)
return load_dataset(**kwargs)