Skip to content

Commit 7438609

Browse files
committed
bench: add --max-tokens and --max-concurrency overrides; plumb into runner
1 parent 11921ca commit 7438609

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

eval_protocol/benchmarks/registry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def _runner(
7474
max_rows: Optional[int | str] = None,
7575
num_runs: Optional[int] = None,
7676
input_params_override: Optional[Dict[str, Any]] = None,
77+
max_concurrency: Optional[int] = None,
7778
) -> Any:
7879
# Map convenience flags to EP_* env used by the pytest flow
7980
if print_summary:
@@ -122,6 +123,8 @@ def _deep_update(base: Dict[str, Any], over: Dict[str, Any]) -> Dict[str, Any]:
122123
max_dataset_rows = ep_config.get("max_dataset_rows")
123124
mcp_config_path = ep_config.get("mcp_config_path")
124125
max_concurrent_rollouts = ep_config.get("max_concurrent_rollouts")
126+
if max_concurrency is not None:
127+
max_concurrent_rollouts = int(max_concurrency)
125128
server_script_path = ep_config.get("server_script_path")
126129
steps = ep_config.get("steps")
127130
mode = ep_config.get("mode")

eval_protocol/benchmarks/run.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def _parse_args() -> argparse.Namespace:
3838
help="Limit rows: integer or 'all' for no limit (maps to EP_MAX_DATASET_ROWS)",
3939
)
4040
parser.add_argument("--num-runs", type=int, help="Override num_runs if provided")
41+
parser.add_argument("--max-tokens", type=int, help="Override max_tokens for generation requests")
42+
parser.add_argument("--max-concurrency", type=int, help="Override max concurrent rollouts")
4143
# Allow overriding reasoning effort explicitly (low/medium/high). If omitted, suite default is used.
4244
# Already mapped by --reasoning-effort above.
4345
return parser.parse_args()
@@ -73,13 +75,20 @@ def main() -> int:
7375
max_rows = int(args.max_rows)
7476
except Exception:
7577
max_rows = str(args.max_rows)
78+
# Build input params override if needed
79+
ip_override = {}
80+
if args.max_tokens is not None:
81+
ip_override["max_tokens"] = int(args.max_tokens)
82+
7683
_ = runner(
7784
model=args.model,
7885
print_summary=args.print_summary,
7986
out=args.out,
8087
reasoning_effort=args.reasoning_effort,
8188
max_rows=max_rows,
8289
num_runs=args.num_runs,
90+
input_params_override=(ip_override or None),
91+
max_concurrency=args.max_concurrency,
8392
)
8493
# Non-zero exit on failure gate is handled within the runner via assertions
8594
return 0

0 commit comments

Comments
 (0)