Skip to content

Commit

Permalink
Removed circular list infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ojh31 committed Nov 22, 2023
1 parent ee437c6 commit 05644d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,10 @@ def get_prompts(
neg_prompts = [p + " " for p in neg_prompts]
if neutral_prompts is not None:
neutral_prompts = [p + " " for p in neutral_prompts]
pos_answers = CircularList([p.strip() + " " for p in pos_answers])
neg_answers = CircularList([p.strip() + " " for p in neg_answers])
for i in range(len(pos_answers)):
pos_answers[i] = pos_answers[i].strip()
for i in range(len(neg_answers)):
neg_answers[i] = neg_answers[i].strip()

# create output dicts
prompt_dict = dict(
Expand Down

0 comments on commit 05644d9

Please sign in to comment.