Skip to content

Commit f4f62b4

Browse files
committed
fix: change subset namings
1 parent fcaa7aa commit f4f62b4

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

bigcodebench/data/bigcodebench.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _ready_bigcodebench_path(subset="", version="default") -> str:
2525
BIGCODEBENCH_VERSION, subset
2626
)
2727

28-
extra = "-subset" if subset else ""
28+
extra = "-" + subset if subset else ""
2929

3030
try:
3131
dataset = load_dataset(BIGCODEBENCH_HF+extra, split=BIGCODEBENCH_VERSION)
@@ -39,7 +39,7 @@ def _ready_bigcodebench_path(subset="", version="default") -> str:
3939

4040

4141
def get_bigcodebench(
42-
err_incomplete=True, subset="full", version="default"
42+
err_incomplete=True, subset="", version="default"
4343
) -> Dict[str, Dict]:
4444
"""Get BigCodeBench from BigCode's github repo and return as a list of parsed dicts.
4545

bigcodebench/evaluate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def evaluate(flags):
124124
assert flags.samples.endswith(".jsonl")
125125
result_path = flags.samples.replace(".jsonl", "_eval_results.json")
126126

127-
problems = get_bigcodebench(hard=flags.hard)
128-
dataset_hash = get_bigcodebench_hash(hard=flags.hard)
127+
problems = get_bigcodebench(subset=flags.subset)
128+
dataset_hash = get_bigcodebench_hash(subset=flags.subset)
129129

130130
if not flags.no_gt:
131131
expected_time = get_groundtruth(n_workers, problems, dataset_hash, flags.check_gt_only, flags.max_as_limit, flags.max_data_limit, flags.max_stack_limit)
@@ -287,7 +287,7 @@ def main():
287287
parser.add_argument(
288288
"--split", required=True, type=str, choices=["complete", "instruct"]
289289
)
290-
parser.add_argument("--hard", action="store_true")
290+
parser.add_argument("--subset", default="", choices=["", "hard"], type=str)
291291
parser.add_argument("--samples", required=True, type=str)
292292
parser.add_argument("--parallel", default=None, type=int)
293293
parser.add_argument("--min-time-limit", default=1, type=float)

bigcodebench/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def main():
125125

126126

127127
assert args.split in ["complete", "instruct"], f"Invalid split {args.split}"
128+
assert args.subset in ["", "hard"], f"Invalid subset {args.subset}"
128129
assert args.backend in ["vllm", "hf", "openai", "mistral", "anthropic", "google"]
129130

130131
if args.greedy and (args.temperature != 0 or args.bs != 1 or args.n_samples != 1)\

0 commit comments

Comments
 (0)