Skip to content

Commit 49d2c52

Browse files
committed
fix: optional bool args
1 parent bdc265c commit 49d2c52

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

bigcodebench/evaluate.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,19 @@ def evaluate(
189189

190190
# run the evaluation
191191
print(f"Command run in sandbox {e2b_endpoint}")
192-
sandbox.commands.run("bigcodebench.evaluate --execution 'local' "
193-
f"--split {split} --subset {subset} --samples {samples} "
194-
f"--pass_k {pass_k} --save_pass_rate {save_pass_rate} --calibrated {calibrated} "
195-
f"--parallel {parallel} --selective_evaluate {selective_evaluate} --min_time_limit {min_time_limit} "
192+
command = "bigcodebench.evaluate --execution 'local' "\
193+
f"--split {split} --subset {subset} --samples {samples} "\
194+
f"--pass_k {pass_k} --save_pass_rate {save_pass_rate} --calibrated {calibrated} "\
195+
f"--parallel {parallel} --selective_evaluate {selective_evaluate} --min_time_limit {min_time_limit} "\
196196
f"--max_as_limit {max_as_limit} --max_data_limit {max_data_limit} --max_stack_limit {max_stack_limit} "
197-
f"--check_gt_only {check_gt_only} --no_gt {no_gt}", on_stderr=lambda x: print(x), on_stdout=lambda x: print(x), timeout=60*50)
197+
198+
if check_gt_only:
199+
command += f"--check_gt_only "
200+
if no_gt:
201+
command += f"--no_gt "
202+
if no_execute:
203+
command += f"--no_execute "
204+
sandbox.commands.run(command, on_stdout=lambda x: print(x), on_stderr=lambda x: print(x), timeout=60*60)
198205

199206
if not check_gt_only:
200207
# download the results

0 commit comments

Comments
 (0)