Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigCodeBench & LCBench update #1857

Merged
merged 4 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions opencompass/datasets/LCBench.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
class LCDataset(BaseDataset):

@staticmethod
def load(path: str, num_repeats: int = 1, difficulty='ALL'):
def load(path: str,
num_repeats: int = 1,
difficulty='ALL',
local_mode=False):
"""Load LC dataset for pass k mode.
Note that you can use num_repeats > 1 when your model does not support
Expand All @@ -38,7 +41,7 @@ def load(path: str, num_repeats: int = 1, difficulty='ALL'):
num_repeats(int): Number of repetition for this dataset to get
multiple responses in special cases.
"""
path = get_data_path(path, local_mode=True)
path = get_data_path(path, local_mode=local_mode)

def processing_test(example):
example['test_case'] = example['test_list']
Expand Down
6 changes: 5 additions & 1 deletion opencompass/datasets/bigcodebench/bigcodebench.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def __init__(
eval_type='instruct',
remote_execute_api='https://bigcode-bigcodebench-evaluator.hf.space/', # noqa
dataset_version: str = 'full',
local_mode: bool = False,
path: str = 'opencompass/bigcodebench',
pass_k: str = '1,5,10',
parallel: int = -1,
min_time_limit: float = 1,
Expand All @@ -84,7 +86,9 @@ def __init__(
super().__init__()
self.dataset = BigCodeBenchDataset.load(
release_version=release_version,
dataset_version=dataset_version)['test']
dataset_version=dataset_version,
local_mode=local_mode,
path=path)['test']
self.eval_type = eval_type
self.remote_execute_api = remote_execute_api

Expand Down