Skip to content

Commit

Permalink
Fix small typo in oaieval run function (openai#1438)
Browse files Browse the repository at this point in the history
This fixes a small typo in `oaieval.py` where
`additional_completion_args` was `additonal_completion_args`. Running
`pre-commit` also removed an unused import.
  • Loading branch information
inwaves committed Dec 21, 2023
1 parent 311e91e commit 23ae8ab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions evals/cli/oaieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import sys
from typing import Any, Mapping, Optional, Union, cast

import openai

import evals
import evals.api
import evals.base
Expand Down Expand Up @@ -137,11 +135,11 @@ def run(args: OaiEvalArguments, registry: Optional[Registry] = None) -> str:

# If the user provided an argument to --completion_args, parse it into a dict here, to be passed to the completion_fn creation **kwargs
completion_args = args.completion_args.split(",")
additonal_completion_args = {k: v for k, v in (kv.split("=") for kv in completion_args if kv)}
additional_completion_args = {k: v for k, v in (kv.split("=") for kv in completion_args if kv)}

completion_fns = args.completion_fn.split(",")
completion_fn_instances = [
registry.make_completion_fn(url, **additonal_completion_args) for url in completion_fns
registry.make_completion_fn(url, **additional_completion_args) for url in completion_fns
]

run_config = {
Expand Down

0 comments on commit 23ae8ab

Please sign in to comment.