Skip to content

[Bugfix] Ignore API CLI overrides for local models - #569

Merged
Keithwwa merged 2 commits into
AISBench:masterfrom
zhongzhouTan-coder:fix/fix-batch-size
Sep 22, 2026
Merged

Keithwwa merged 2 commits into
AISBench:masterfrom
zhongzhouTan-coder:fix/fix-batch-size

Conversation

@zhongzhouTan-coder

Copy link
Copy Markdown
Contributor

PR Type / PR类型

  • Feature(功能新增)
  • Bugfix(Bug 修复)
  • Docs(文档更新)
  • CI/CD(持续集成/持续部署)
  • Refactor(代码重构)
  • Perf(性能优化)
  • Dependency(依赖项更新)
  • Test-Cases(测试用例更新)
  • Other(其他)

Related Issue | 关联 Issue
Fixes #504

🔍 Motivation / 变更动机

API 模型通用命令行参数当前会应用到所有模型配置。由于本地模型同样包含 batch_size、path、max_out_len 等字段,--batch-size 等 API 专用参数会意外覆盖本地模型配置。

API model CLI overrides were applied to every model configuration. Local models share fields such as batch_size, path, and max_out_len, so API-only options could silently override their configured values.

📝 Modification / 修改内容

  • API CLI 参数仅应用于 attr="service" 的模型。
  • 本地模型收到 API CLI 参数时保留原配置,并打印一条合并告警,列出被忽略的参数。
  • 增加回归测试,覆盖本地模型参数不被覆盖、告警内容,以及未传 API 参数时不产生告警。

📐 Associated Test Results / 关联测试结果

UV_CACHE_DIR=/tmp/benchmark-uv-cache uv run pytest -q tests/UT/cli/test_config_manager.py
71 passed, 9 subtests passed

git diff --check passed.

⚠️ BC-breaking (Optional) / 向后不兼容变更(可选)

No. This restores the documented behavior that API model CLI overrides apply only to service models.

✅ Checklist / 检查列表

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues. / 使用预提交或其他 linting 工具来修复潜在的 lint 问题。
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。
  • The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。
  • All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects. / 如果此拉取请求对下游或其他相关项目有潜在影响,应在那些项目中测试此 PR。
  • CLA has been signed and all committers have signed the CLA in this PR. / CLA 已签署,且本 PR 中的所有提交者均已签署 CLA。

👥 Collaboration Info / 协作信息

Copilot AI lite review requested due to automatic review settings September 21, 2026 03:00
@github-actions github-actions Bot added the no_review PR 未包含任何检视意见,合入前必须包含检视意见 label Sep 21, 2026
@github-actions

Copy link
Copy Markdown

🚫 PR 合入质量检查未通过,PR 已被禁止合入。

未通过项:no_review

  • 无检视意见:请至少邀请一位 reviewer 提交检视意见(Approve / Request changes / Comment 均可)。

请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

User-facing documentation still describes API CLI overrides as applying to all model configurations.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

This bugfix restricts API CLI overrides to service models, preserving local model settings and warning when overrides are ignored.

Changes:

  • Limits API CLI overrides to attr="service" models.
  • Adds regression tests for local-model preservation and warnings.
File Description
tests/​UT/​cli/​test_config_manager.py Tests local-model behavior and warning messages.
ais_bench/​benchmark/​cli/​config_manager.py Restricts overrides to service models.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 21, 2026 03:09
@github-actions github-actions Bot removed the no_review PR 未包含任何检视意见,合入前必须包含检视意见 label Sep 21, 2026
@github-actions

Copy link
Copy Markdown

🚫 PR 合入质量检查未通过,PR 已被禁止合入。

未通过项:review_opened

  • 检视意见未闭环:还存在 1 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。

@github-actions github-actions Bot added the review_opened PR 中存在未闭环的检视意见,所有检视意见必须闭环后才能合入 label Sep 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Two documentation inconsistencies remain unresolved in the English README counterpart and parser docstring.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)

Comment thread README.md Resolved
@github-actions github-actions Bot removed the review_opened PR 中存在未闭环的检视意见,所有检视意见必须闭环后才能合入 label Sep 22, 2026
@github-actions

Copy link
Copy Markdown

✅ PR 合入质量五项检查全部通过,允许合入。

@Keithwwa
Keithwwa merged commit 3a314f4 into AISBench:master Sep 22, 2026
7 of 8 checks passed

This branch was previously deployed

1 inactive deployment
smoke-test-approval — 523882fa Deployed Sep 21, 2026 by zhongzhouTan-coder via run_smoke_test_cases #738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 纯模型评测场景不支持常用模型参数使用命令行直接配置,但拉起命令使用--batch-size 2仍生效,需要修改

3 participants