Skip to content

Commit 59e01fc

Browse files
easelclaude
andcommitted
fix(forge): align with refactored EvalConfig + run_scenario signature
areas/forge.py was constructing EvalConfig with the old `client_factory=` and `sampling=` kwargs and calling run_scenario(scenario, client, config). The vendored forge_eval was refactored (eval_runner.py:73) to drop those fields, and the new run_scenario signature is (client, scenario, config) — positional order matters. Effect of the bug: any `lucebench --area forge` invocation against v0.2.3 raises immediately with: TypeError: EvalConfig.__init__() got an unexpected keyword argument 'client_factory' Fix: drop the broken kwargs, build the client per-scenario via a local _build_client() helper, and swap the run_scenario arg order. No behavioural change beyond making forge run end-to-end again. Bumps version to 0.2.4. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 349cebd commit 59e01fc

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "luce-bench"
3-
version = "0.2.3"
3+
version = "0.2.4"
44
description = "Capability benchmarks for chat-completion endpoints (ds4-eval, HumanEval, long-context, forge)"
55
readme = "README.md"
66
license = { file = "LICENSE" }

‎src/lucebench/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
NOTICE for attribution.
1919
"""
2020

21-
__version__ = "0.2.3"
21+
__version__ = "0.2.4"

‎src/lucebench/areas/forge.py‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,23 +269,27 @@ async def send( # type: ignore[override]
269269

270270
rows: list[dict[str, Any]] = []
271271
n_pass = 0
272-
cfg = EvalConfig(
273-
client_factory=lambda: _RecordingAnthropicClient(
272+
# EvalConfig was refactored in the vendored forge_eval (eval_runner.py:73)
273+
# to drop the client_factory and sampling fields. Build the client
274+
# per-scenario in a local helper instead; run_scenario's signature is
275+
# (client, scenario, config) — positional order matters.
276+
cfg = EvalConfig()
277+
278+
def _build_client() -> "_RecordingAnthropicClient":
279+
return _RecordingAnthropicClient(
274280
api_key=api_key,
275281
base_url=url.rstrip("/"),
276282
model=model,
277283
max_tokens=max_tokens,
278284
timeout=timeout_s,
279-
),
280-
sampling={"temperature": 0.0, "max_tokens": max_tokens},
281-
)
285+
)
282286

283287
for sc in scenarios:
284-
client = cfg.client_factory()
288+
client = _build_client()
285289
client.reset_log()
286290
t0 = _time.perf_counter()
287291
try:
288-
res: RunResult = asyncio.run(run_scenario(sc, client, cfg))
292+
res: RunResult = asyncio.run(run_scenario(client, sc, cfg))
289293
err = None
290294
except Exception as exc:
291295
res = None

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)