mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
14 lines
392 B
Python
14 lines
392 B
Python
from datasets import Dataset, DatasetDict
|
|
|
|
from opencompass.datasets import BaseDataset
|
|
|
|
|
|
class LMEvalDataset(BaseDataset):
|
|
"""A dataset wrapper around the evaluator inputs, designed for
|
|
OpenCompass's internal use."""
|
|
|
|
@staticmethod
|
|
def load(**kwargs):
|
|
content = {k: v for k, v in kwargs.items() if v}
|
|
return DatasetDict(dict(test=Dataset.from_dict(content)))
|