Repository navigation
[AISBench] New harbor adapter - #503
Merged
Merged
Conversation
added 30 commits
May 18, 2026 17:31
SJTUyh
temporarily deployed
to
smoke-test-approval
September 1, 2026 00:58 — with
GitHub Actions
Inactive
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
SJTUyh
had a problem deploying
to
smoke-test-approval
September 1, 2026 08:22 — with
GitHub Actions
Error
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
SJTUyh
had a problem deploying
to
smoke-test-approval
September 1, 2026 08:37 — with
GitHub Actions
Error
SJTUyh
had a problem deploying
to
smoke-test-approval
September 1, 2026 09:05 — with
GitHub Actions
Error
SJTUyh
temporarily deployed
to
smoke-test-approval
September 1, 2026 09:27 — with
GitHub Actions
Inactive
SJTUyh
commented
Sep 2, 2026
SJTUyh
had a problem deploying
to
smoke-test-approval
September 2, 2026 02:32 — with
GitHub Actions
Failure
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
SJTUyh
temporarily deployed
to
smoke-test-approval
September 2, 2026 03:17 — with
GitHub Actions
Inactive
SJTUyh
temporarily deployed
to
smoke-test-approval
September 3, 2026 01:29 — with
GitHub Actions
Inactive
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
Libotry
approved these changes
Sep 3, 2026
Collaborator
|
超大PR已报备评审 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。
PR Type / PR类型
Related Issue | 关联 Issue
Fixes #(issue ID / issue 编号) / Relates to #(issue ID / issue 编号)
Fixes #516
🔍 Motivation / 变更动机
AISBench 原生仅具备推理/精度/性能测评能力,缺少对 Agent(智能体) 的测评能力。本 PR 引入一套完全独立的 Agent 测评链路,通过集成 Harbor 框架,让用户能用熟悉的 AISBench 方式发起 Agent 测评:
--mode agent)拉起 Harbor 评测,实时查看每个 case 状态;module.path:ClassName;name@version、packageorg/name@ref);📝 Modification / 修改内容
新增(✅)
cli/argument_parser.py:_agent_parser()新增 agent 参数组 +--mode增加agent/agent_viz(-a/--agent、--api-base、--agent-api-key、-p/--agent-dataset-path、-d/--dataset、-n/--n-concurrent、-k/--n-attempts、-e/--environment、--timeout-multiplier、--max-retries、--monitor-port、--purge-exception-cases等)。cli/workers.py:新增AgentEvalworker +WORK_FLOW增加agent/agent_viz;_apply_cli_args合并 CLI 参数到模型/数据集配置。runners/harbor_runner.py:HarborRunner(单任务进程内 / 多任务子进程 + 看板;Ctrl+C 清理、超时兜底;--purge-exception-cases预清理)。runners/harbor_monitor.py:HarborMonitor+HarborMonitorServer(标准库http.server,两级快照 + 实时 HTTP 端点)。tasks/custom_tasks/harbor_agent_task.py:HarborAgentTask(兼容全部 Agent、全量数据集来源、进度指标)。utils/agent_params.py:AgentParamAdapter(显式映射 + 描述符发现 + 兜底约定 + 按 Agent 默认注入;含dsh等新接入 Agent)。summarizers/harbor.py:HarborSummarizer(单表 + 单 CSV)。requirements/agent.txt、setup.pyextras_require["agent"]:独立依赖集。tests/UT/{utils,runners,tasks/custom_tasks,summarizers}新增 Harbor 相关测试。docs/source_{zh_cn,en}/新增/更新 Agent 测评指南、CLI 参数说明、场景简介。改造(🧩 惰性化/增强)
runners/base.py:TasksMonitor.stop_state_board停止标志。runners/local.py、utils/config/run.py、datasets/__init__.py、tasks/__init__.py、utils/file/__init__.py、openicl/icl_inferencer/icl_base_local_inferencer.py等:惰性导入以支持 agent 独立依赖集。📐 Associated Test Results / 关联测试结果
runners/harbor_runner.py≈ 90%,runners/harbor_monitor.py≈ 96%,tasks/custom_tasks/harbor_agent_task.py≥ 90%,summarizers/harbor.py100%,utils/agent_params.py≥ 80%(行超过 80%、分支超过 70%,满足设计约束)。python3 run_tests.py UT/(全量通过,总覆盖率 ≥ 80%)。ais_bench <cfg> --mode agent -a terminus-2 --model ... --api-base ... -p ... --monitor-port 8788可实时查看 case 状态并输出单表 + CSV。和harbor精度比较:
https://github.com/SJTUyh/benchmark/wiki/%E3%80%90%E9%AA%8C%E8%AF%81%E6%8A%A5%E5%91%8A%E3%80%91AISBench%E6%8E%A5%E5%85%A5harbor%E6%A1%86%E6%9E%B6
新引入的 Agent 相关 CLI 均为本次新增,不影响既有
all/infer/eval/perf等模式。两点命名说明:--agent-api-key,数据集路径命名为-p/--agent-dataset-path,以避免与既有api_model的--api-key、--path冲突(两组参数可并行解析)。无。新增链路与原生链路隔离;监控服务仅定时读取落盘文件并按 mtime 增量缓存,高频刷新开销低。
🌟 Use cases (Optional) / 使用案例(可选)
ais_bench --mode agent -a terminus-2 --model hosted_vllm/qwen3 \ --api-base http://0.0.0.0:8080/v1 -p /path/to/terminal-bench-2 \ -n 5 -k 1 -e docker --monitor-port 8788ais_bench/configs/agent_example/harbor_agent_task.py。--reuse <ts>;异常用例自动重试:--reuse <ts> --purge-exception-cases。--mode agent_viz --reuse <ts>。docs/source_zh_cn/base_tutorials/scenes_intro/agent_benchmark.md及英文版、all_params/cli_args.md(中/英)、scenes_intro/home.md(中/英)。✅ Checklist / 检查列表
Before PR:
After PR:
👥 Collaboration Info / 协作信息
🌟 Useful CI Command / 实用的CI命令
/gemini review/gemini summary/gemini help/readthedocs build/pr_check