Skip to content

Commit

Permalink
Add NotImplementedError if user tries to use a solver
Browse files Browse the repository at this point in the history
  • Loading branch information
JunShern committed May 22, 2024
1 parent b01c56d commit a506f0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion evals/elsuite/schelling_point/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from evals.elsuite.schelling_point.prompts import sys_prompts_ci, sys_prompts_no_ci
from evals.elsuite.schelling_point.utils import get_response
from evals.eval import Eval
from evals.solvers.solver import Solver


class SchellingPoint(Eval):
Expand All @@ -22,6 +23,9 @@ def __init__(
*args,
**kwargs,
):
if any([isinstance(completion_fn, Solver) for completion_fn in completion_fns]):
raise NotImplementedError("SchellingPoint does not currently support Solvers")

super().__init__(completion_fns, *args, **kwargs)

random.seed(seed)
Expand All @@ -34,7 +38,6 @@ def __init__(

self.temperature = temperature

self.completion_fns = completion_fns
if len(self.completion_fns) == 1:
self.completion_fns = self.completion_fns * n_copies
assert len(self.completion_fns) == n_copies, "Must provide n_copies completion_fns"
Expand Down

0 comments on commit a506f0c

Please sign in to comment.