diff --git a/opencompass/datasets/LCBench.py b/opencompass/datasets/LCBench.py index 76cc0fae..cd747788 100644 --- a/opencompass/datasets/LCBench.py +++ b/opencompass/datasets/LCBench.py @@ -13,6 +13,7 @@ from datasets import DatasetDict, concatenate_datasets, load_dataset from opencompass.openicl.icl_evaluator import BaseEvaluator from opencompass.registry import ICL_EVALUATORS, LOAD_DATASET +from opencompass.utils import get_data_path from .base import BaseDataset @@ -37,6 +38,7 @@ class LCDataset(BaseDataset): num_repeats(int): Number of repetition for this dataset to get multiple responses in special cases. """ + path = get_data_path(path, local_mode=True) def processing_test(example): example['test_case'] = example['test_list'] diff --git a/opencompass/datasets/humaneval.py b/opencompass/datasets/humaneval.py index e5f602e4..98acdf41 100644 --- a/opencompass/datasets/humaneval.py +++ b/opencompass/datasets/humaneval.py @@ -33,7 +33,7 @@ pip install -e evalplus''' class HumanevalDataset(BaseDataset): @staticmethod - def load(path: str, num_repeats: int = 1): + def load(path: str, num_repeats: int = 1, local_mode: bool = False): """Load humaneval dataset for pass k mode. Note that you can use num_repeats > 1 when your model does not support @@ -49,7 +49,7 @@ class HumanevalDataset(BaseDataset): num_repeats(int): Number of repetition for this dataset to get multiple responses in special cases. """ - path = get_data_path(path) + path = get_data_path(path, local_mode=local_mode) if environ.get('DATASET_SOURCE') == 'ModelScope': from modelscope import MsDataset dataset = MsDataset.load(path, subset_name='openai_humaneval', split='test')