Skip to content

Commit

Permalink
Fix bug in setting until kwarg in openai completions (#1784)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranby authored May 5, 2024
1 parent 297966f commit 30c060d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lm_eval/models/openai_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def generate_until(self, requests, disable_tqdm: bool = False) -> List[str]:
if "until" in kwargs.keys():
until = kwargs.pop("until")
if isinstance(until, str):
until = [kwargs]
until = [until]
elif not isinstance(until, list):
raise ValueError(
f"Expected repr(kwargs['until']) to be of type Union[str, list] but got {until}"
Expand Down

0 comments on commit 30c060d

Please sign in to comment.