Skip to content

Commit

Permalink
Revert "openai.error.InvalidRequestError -> openai.BadRequestError in…
Browse files Browse the repository at this point in the history
… bluff"

This reverts commit f224fa3.
  • Loading branch information
johny-b committed Nov 15, 2023
1 parent 88f99bc commit c6d5cfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evals/elsuite/bluff/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import pandas as pd
import statsmodels.formula.api as smf
from openai import BadRequestError
from openai.error import InvalidRequestError

import evals
from evals.api import CompletionFn
Expand Down Expand Up @@ -62,7 +62,7 @@ def eval_sample(self, solver: Solver, sample_ix: int, rng: random.Random):
**info,
**self._get_game_metrics(game),
)
except BadRequestError as e:
except InvalidRequestError as e:
if str(e).startswith("This model's maximum context length is"):
logger.warning(
f"Game exceeded the context window - sample {sample_ix} will be ignored. Consider decreasing n_rounds."
Expand Down

0 comments on commit c6d5cfe

Please sign in to comment.