Skip to content

Commit

Permalink
[evals] added more abc options to from_n choice_strings (openai#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlbayes committed Mar 22, 2023
1 parent 4f090a0 commit 8294f6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evals/elsuite/modelgraded/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def __init__(
self.choice_strings = modelgraded_specs.pop("choice_strings")
if self.choice_strings == "from_n":
self.choice_strings = [str(i + 1) for i in range(self.multicomp_n)]
elif self.choice_strings == "from_n_abc":
self.choice_strings = [string.ascii_lowercase[i] for i in range(self.multicomp_n)]
elif self.choice_strings == "from_n_ABC":
self.choice_strings = [string.ascii_uppercase[i] for i in range(self.multicomp_n)]
# make sure each choice doesn't contain any punctuation
for s in self.choice_strings:
assert not any(c in s for c in string.punctuation), f"{s} contains punctuation"
Expand Down

0 comments on commit 8294f6c

Please sign in to comment.