Skip to content

Commit 4b7f51b

Browse files
authored
Merge pull request #144 from foundation-model-stack/fix_int_program_id
fixed issue where program_id was int when should have been string
2 parents b69e586 + e2846bc commit 4b7f51b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/drive_paged_programs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,12 @@ def parse_program_limit(limit_str: str) -> tuple[int, str]:
440440

441441
for program_str in args.programs:
442442
enforce_prompt_split = program_str.split(":")
443+
program_id = enforce_prompt_split[0]
443444
if len(enforce_prompt_split) == 1:
444445
programs.append(
445-
ProgramInfo(int(enforce_prompt_split[0]), 0, ">=", 0, ">=")
446+
ProgramInfo(program_id, 0, ">=", 0, ">=")
446447
) # this will always satisfy
447448
else:
448-
program_id = enforce_prompt_split[0]
449449
enforce_batch_size, enforce_prompt_length = (
450450
_ for _ in enforce_prompt_split[1].split(",")
451451
)
@@ -470,7 +470,8 @@ def parse_program_limit(limit_str: str) -> tuple[int, str]:
470470

471471
if len(programs) == 0:
472472
programs = [
473-
ProgramInfo(p.program_id, 0, ">=", 0, ">=") for p in program_criteria_list
473+
ProgramInfo(str(p.program_id), 0, ">=", 0, ">=")
474+
for p in program_criteria_list
474475
]
475476

476477

0 commit comments

Comments
 (0)