Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run unit tests

on:
workflow_dispatch:
pull_request:
branches:
- main
Expand Down
6 changes: 3 additions & 3 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.error import InvalidRequestError
from openai import BadRequestError

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