Skip to content

Commit 9c8ac7a

Browse files
committed
fix: change task id to idx
1 parent 2591322 commit 9c8ac7a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bigcodebench/generate.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ def codegen(
4141
dirname = os.path.dirname(save_path)
4242
if not os.path.exists(dirname) and dirname != "":
4343
os.makedirs(dirname)
44-
for task_id, task in p.track(dataset.items()):
44+
for id_num, (task_id, task) in enumerate(p.track(dataset.items())):
4545
if id_range is not None:
46-
id_num = int(task_id.split("/")[1])
4746
low, high = id_range
4847
if id_num < low or id_num >= high:
4948
p.console.print(f"Skipping {task_id} as it is not in {id_range}")

0 commit comments

Comments
 (0)