Skip to content

Commit

Permalink
Fix handling leftover prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
mzukowski-reef committed Sep 26, 2024
1 parent a99fa78 commit e5d448b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/compute_horde_prompt_gen/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def generate_prompts(
)

# Use leftover prompts from previous batch if available
while leftover_prompts and total_prompts > 0:
while leftover_prompts and len(new_prompts) < total_prompts:
new_prompts.append(leftover_prompts.popleft())
total_prompts -= 1

if len(new_prompts) > total_prompts:
# Save extra prompts for next batch
Expand Down

0 comments on commit e5d448b

Please sign in to comment.