OpenCompass/opencompass/datasets/huggingface.py
Songyang Zhang c09fc79ba8
[Feature] Support OpenAI ChatCompletion (#1389)
* [Feature] Support import configs/models/summarizers from whl

* Update

* Update openai sdk

* Update

* Update gemma
2024-08-01 19:10:13 +08:00

18 lines
473 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)