Skip to content

Commit c62956d

Browse files
committed
remove None option for router
1 parent a116450 commit c62956d

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def main(
1818
def _run(pure: bool):
1919
results: list[EvalResult] = []
2020
split = "pure" if pure else "base"
21+
result_dir = abspath(pjoin("results", model, split))
2122
for i in range(n_repeats):
22-
result_dir = abspath(pjoin("results", model, split))
2323
os.makedirs(result_dir, exist_ok=True)
2424
result_file = pjoin(result_dir, f"run-{i}.jsonl")
2525
r = run_one_model(

src/tfbench/experiment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def run_one_model(
3131
EvalResult: evaluation result including accuracy
3232
"""
3333
client = router(model, pure, effort)
34-
assert client is not None, f"Failed to create client for {model}."
3534

3635
tasks = load_tfb_from_hf("pure" if pure else "base")
3736
gen_results: list[LMAnswer | None] = []

src/tfbench/lm/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def router(
4848
model_name: str,
4949
pure: bool,
5050
effort: str | None = None,
51-
) -> LM | None:
51+
) -> LM:
5252
"""Route the model name to the appropriate LM class."""
5353
if model_name in OAI_MODELS:
5454
return OpenAIChatCompletion(model_name=model_name, pure=pure)

0 commit comments

Comments
 (0)