Skip to content

Commit 53f38ed

Browse files
committed
Enhance model configuration files by adding 'max_connections' parameter and updating 'timeout' and 'max_retries' values for improved API request handling. Update config_loader.py to unify timeout handling across clients while maintaining backward compatibility with legacy parameters.
1 parent f2d2c62 commit 53f38ed

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

configs/models/_template_api.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ model:
4646
temperature: 0.6
4747
top_p: 0.95
4848
reasoning_effort: high # For reasoning models (high/low/xhigh)
49-
timeout: 3600 # Request timeout (seconds)
50-
max_retries: 10 # Retry count on errors
49+
timeout: 7200 # Request timeout (seconds)
50+
max_retries: 2 # Retry count on errors
51+
max_connections: 30 # API 동시 요청 수 (기본값: 10)
5152

5253
# =============================================================================
5354
# Benchmark-specific Overrides (optional)

configs/models/_template_vllm.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ model:
5555
max_tokens: 16384
5656
temperature: 0.6
5757
top_p: 0.95
58+
timeout: 7200 # Request timeout (seconds)
59+
max_retries: 2
60+
max_connections: 30 # API 동시 요청 수 (기본값: 10)
5861

5962
# For thinking/reasoning models, add:
6063
extra_body:

run_eval.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def get_model_generate_config(config_name: str, benchmark: str) -> dict:
355355
"reasoning_tokens": "reasoning_tokens",
356356
"timeout": "timeout",
357357
"max_retries": "max_retries",
358+
"max_connections": "max_connections", # API 동시 요청 수
358359
}
359360

360361
for key, eval_key in key_mapping.items():

src/core/config_loader.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,21 @@ def get_inspect_model_args(self, config_name: str, benchmark: Optional[str] = No
436436
if api_key:
437437
args["api_key"] = api_key
438438

439-
# Client timeout and request timeout
439+
# Client timeout - unified "timeout" parameter for all clients
440440
client = model_section.get("client", "openai")
441441
params = model_section.get("params", {})
442442
benchmark_overrides = model_config.get("benchmarks", {}).get(benchmark, {}) if benchmark else {}
443443

444-
# client_timeout for OpenAI provider
445-
client_timeout = benchmark_overrides.get("client_timeout", params.get("client_timeout"))
446-
if client_timeout is not None:
447-
if client == "openai":
448-
args["client_timeout"] = float(client_timeout)
449-
450-
# timeout for litellm provider (passed to acompletion)
444+
# timeout: works for both openai and litellm clients
445+
# Also support legacy client_timeout for backward compatibility
451446
timeout = benchmark_overrides.get("timeout", params.get("timeout"))
447+
if timeout is None:
448+
timeout = benchmark_overrides.get("client_timeout", params.get("client_timeout"))
449+
452450
if timeout is not None:
453-
if client == "litellm":
451+
if client == "openai":
452+
args["client_timeout"] = float(timeout)
453+
elif client == "litellm":
454454
args["timeout"] = float(timeout)
455455

456456
return args

0 commit comments

Comments
 (0)