Skip to content

[Docs] Add recommand instruction for custom configs - #349

Merged
Libotry merged 48 commits into
AISBench:masterfrom
SJTUyh:custom_cfg
Aug 26, 2026
Merged

Libotry merged 48 commits into
AISBench:masterfrom
SJTUyh:custom_cfg

Conversation

@SJTUyh

@SJTUyh SJTUyh commented Jun 22, 2026 •

Copy link
Copy Markdown
Collaborator

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类型

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

Related Issue | 关联 Issue
Fixes #(issue ID / issue 编号) / Relates to #(issue ID / issue 编号)
Fixes #294

🔍 变更动机 / Motivation

custom_cfg 分支相对 master_center 重写了文档体系(含大量英文场景文档),但与现有代码状态存在明显不一致:

  1. 英文文档引用了不存在的样例/配置:如 performance_*.py 8 个样例未创建;代码中虚构 API(vLLMCausalLM、GenericDataset、伪造 SyntheticDataset 参数、顶层 request_rate/num_prompts 变量、不存在的 --url CLI 参数);文档中大量 *_zh_cn.py 中文注释样例但英文文档全部直接引用。
  2. 文档链接/锚点系统性失效:datasets.md 已被迁移到 get_started/ 但大量文档仍指向 all_params/;MyST github_slugify 锚点规则(标题改名、&→--)导致数十个锚点无法解析;新增的"各场景自定义配置文件示例"章节未被导航/相关场景文档引用。
  3. 缺乏完整的英文场景样例与英文场景文档:performance_benchmark.md 的 quick start 用了虚构代码块;12 个精度场景样例仅含中文注释版本。

本 PR 的目标:让用户充分感知并正确使用"自定义配置文件"这一能力——通过补齐代码样例、修正文档与样例间的索引关系、引入英文版样例并修正锚点,恢复文档的可信度与可执行性。


📝 修改内容 / Modification

整体规模:235 个文件变更,+7128 / −1202 行。

1. 补齐自定义配置文件样例(48 个新增文件,均通过 python -m py_compile 验证)

1.1 ais_bench/configs/api_examples/(9 个新文件)

  • infer_vllm_api_multi_model_multi_dataset.py:多模型 × 多数据集精度测评(笛卡尔积)
  • infer_vllm_api_with_model_dataset_combinations.py:通过 model_dataset_combinations 精确控制配对
  • infer_vllm_api_with_judge_model.py:AIME 2025 裁判模型测评
  • perf_vllm_api_synthetic.py:合成数据集性能测评(自定义输入/输出 token 长度分布)
  • perf_vllm_api_stable_stage.py:稳态性能测评(多个 request_rate)
  • perf_vllm_api_multiturn.py:ShareGPT 多轮对话性能测评
  • perf_vllm_api_custom_dataset.py:自定义数据集性能测评
  • perf_vllm_api_rps_distribution.py:RPS 分布控制(traffic_cfg 含 burstiness、ramp-up)

1.2 ais_bench/configs/performance_benchmark/(8 个新文件)

英文性能场景样例:performance_qwen2_7b_sharegpt.py、performance_multi_dataset.py、performance_multi_rate.py、performance_multi_model.py、performance_synthetic.py、performance_seq_combinations.py、performance_fixed_request.py、performance_re_eval.py。

1.3 ais_bench/configs/hf_example/(1 个)

  • infer_hf_multi_model_multi_dataset.py:多模型 × 多数据集纯模型测评。

1.4 ais_bench/configs/lmm_example/(1 个)

  • infer_lmm_multi_dataset.py:多模态多数据集测评。

1.5 精度测评场景样例(28 个)

为 accuracy_benchmark/ 和 accuracy_benchmark_local/ 下已有的 8 个 *_zh_cn.py 样例全部补充英文 *_en.py 版本,注释与命名规范保持一致。

1.6 快速上手示例

  • ais_bench/configs/model_api_test_en.py / model_api_test_zh_cn.py:英文/中文双版快速入门配置。

2. 修复英文性能文档(performance_benchmark.md)

  • 解决 git 冲突标记(<<<<<<< HEAD / ======= / >>>>>>> master_center)
  • 将所有虚构 API(vLLMCausalLM、GenericDataset、AccuracyEvaluator、伪造 SyntheticDataset 参数、顶层 request_rate/num_prompts/stats_list)替换为仓库实际存在的真实 API
  • 修正文档中所有命令路径为 ais_bench/configs/performance_benchmark/performance_*.py
  • 重写"Specifying Custom Performance Dimensions"章节,给出可工作的 summarizer 配置示例

3. 完善 run_custom_config.md(中英文)

  • 新增章节:"Why Use a Custom Configuration File"(CLI vs 配置文件对比)、"Configuration Files Are Python Scripts"(含 for 循环、列表推导、.copy()、环境变量条件)、"Complete Configuration File Variable Reference"(models/datasets/summarizer/model_dataset_combinations/work_dir/infer/eval)、"Custom Configuration File Examples for Each Scenario"(10 个场景完整示例代码)
  • 重写"List of Preset Custom Configuration File Samples":按快速上手/服务化精度/服务化性能/纯模型/多模态/精度场景/纯模型精度场景/性能场景/通用工具分类,补充全部 48 个新文件链接
  • 修正自定义数据集示例中的虚构 GenericDataset → 真实 CustomDataset、AccuracyEvaluator → AccEvaluator

4. 修复文档间索引(25+ 处)

系统性修正以下问题:

  • 失效文档引用:将 16 处 all_params/datasets.md → get_started/datasets.md,并修正对应锚点(synthetic-dataset → randomly-synthesized-datasets、configure- → configuring-)
  • 失效锚点:5 个英文文档中 #custom-config-file-examples-for-various-scenarios → #custom-configuration-file-examples-for-each-scenario;judge_model_evaluate.md 的 4 个旧锚点 + 中文 1 个 中断续测-失败用例重测(按 MyST 规则改双连字符)
  • 缺失文件引用:run_custom_config.md 中 demo_infer_vllm_api_general_chat.py → demo_infer_vllm_api.py(中英各 2 处)
  • 路径笔误:practice_nvidia.md 中 hf_model/hf_chat_model.py → hf_models/hf_chat_model.py(中英)
  • 改名章节锚点:quick_start.md #command-meaning → #start-evaluation-choose-one-of-two-methods;performance_benchmark.md #vllm-model-backend → #service-oriented-inference-backend、#synthetic-dataset-performance-evaluation → #4-synthetic-dataset-performance-evaluation、中文 perf 文档的两个标签页链接改为纯文本指引
  • dataset README 链接修正:longbench qmsum(longbenchqmsum_gen.py → longbenchqmsum/longbench_qmsum_gen.py)、SuperGLUE_BoolQ(_gen_883d50_str → _gen_0_shot_noncot_str)
  • 根 README 中 4 处 doc/users_guide/ 失效路径 → docs/source_{zh_cn|en}/...
  • datasets.md 锚点(中文):开源数据集/配置开源数据集(确认为现有标题);accuracy_metric.md #ii-definitions-and-relationships-of-passk-consk-and-avgn

5. 配套修改

  • ais_bench/benchmark/cli/config_manager.py:移除 self._check_summarizer_config() 调用(与 run_custom_config.md 中"summarizer 可省略/自定义"语义保持一致)
  • docs/requirements.txt:新增 sphinx_design(与 conf.py 中 'sphinx_design' extension 配套)
  • README.md / README_en.md:与 4 处失效 doc/users_guide/ 路径对齐

📐 关联测试结果 / Associated Test Results

  • ✅ 48 个新样例文件全部通过 python -m py_compile 语法检查
  • ✅ 文档链接/锚点全量自检脚本(基于 MyST github_slugify 精确算法实现):原 71 处问题全部修复至 0 项真实问题(剩余 8 项为"仅报告"项:models.md 的 vllm_api_old 行引用已删除的类/默认配置;develop_guide/new_dataset.md 为模板占位符示例链接)
  • ✅ 数据集 README 与根 README 内链全量自检(138 个文件扫描):0 问题

样例+文档样例执行验证报告:
https://github.com/SJTUyh/benchmark/wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A0%B7%E4%BE%8B%E6%96%87%E6%A1%A3%E6%B3%9B%E5%8C%96%E2%80%90%E6%B5%8B%E8%AF%95%E6%96%87%E6%A1%A3


⚠️ 向后不兼容变更 / BC-breaking

无。这是纯文档 + 新增样例 + 1 行 CLI 配置校验弱化的变更,未改动 API、配置 schema、CLI 参数。

config_manager.py 的 _check_summarizer_config() 调用被移除,意味着自定义配置文件中不显式包含 summarizer 字段时不再视为错误——这与 run_custom_config.md 中"summarizer 可省略"的教学描述一致。如果下游项目依赖 summarizer 必须存在的隐式校验,需要在自己的检查逻辑中补回。当前仓库 CLI 默认会注入 example summarizer(见 config_manager.py:_load_summarizers_config),所以默认值行为不变。


⚠️ 性能下降 / Performance degradation

无。文档与样例变更不影响运行时性能。


🌟 使用案例 / Use cases

新样例覆盖以下典型场景(详见 run_custom_config.md "Custom Configuration File Examples for Each Scenario"):

  1. 服务化精度测评(infer_vllm_api_multi_model_multi_dataset.py)
  2. 裁判模型精度测评(infer_vllm_api_with_judge_model.py)
  3. 服务化合成数据集性能测评(perf_vllm_api_synthetic.py)
  4. 稳态性能测评(perf_vllm_api_stable_stage.py)
  5. 多轮对话性能测评(perf_vllm_api_multiturn.py)
  6. 自定义数据集性能测评(perf_vllm_api_custom_dataset.py)
  7. RPS 分布控制性能测评(perf_vllm_api_rps_distribution.py)
  8. 纯模型多模型多数据集测评(infer_hf_multi_model_multi_dataset.py)
  9. 多模态多数据集测评(infer_lmm_multi_dataset.py)

✅ 检查列表 / Checklist

Before PR:

  • 预提交检查:48 个新样例文件全部通过 python -m py_compile
  • 文档/样例一致性:自检脚本验证文档间 71 项索引问题全部修复
  • 文档链接可达:datasets/README 与根 README 的内链 138 个文件全量扫描通过
  • 所有相关文档(run_custom_config.md、performance_benchmark.md、accuracy_benchmark*.md、所有 advanced_tutorials/*.md、所有 best_practices/*.md、extended_benchmark/**/*.md)已更新以反映代码与样例的实际状态

After PR:

  • 建议下游集成项目在合并前通过 /readthedocs build 验证文档构建无 myst.xref_missing 等警告
  • 本 PR 仅包含文档与样例变更,无代码语义影响,无需下游适配

👥 协作信息 / Collaboration Info

  • 建议审核人:@AISBench/maintainers
  • 相关模块负责人:文档团队、模型后端团队
  • 其他说明:
    • 提交计划:本 PR 基于 .trae/documents/improve_custom_config_docs.md 的完整实施
    • 未处理的"仅报告"遗留问题:ais_bench/benchmark/configs/models/vllm_api_old.py 已从代码库移除(master_center 中也不存在),但 models.md 第 24 行、docs/source_{en|zh_cn}/base_tutorials/all_params/models.md 仍引用 vllm_api_old.py 和 infer_vllm_api_old.py——这是"旧版 vLLM API 被删除但文档/样例未同步"的历史遗留问题,修复需决定是删除该行/样例还是恢复类,建议单独开 issue 处理

🌟 实用的 CI 命令 / Useful CI Command

命令 说明
/gemini review 对当前 PR 执行代码审核
/gemini summary 对当前 PR 生成摘要
/readthedocs build 触发 Read the Docs 文档构建验证链接与锚点解析
/pr_check 手动重新触发 PR 合入质量检查工作流

💡 备注:本 PR 不包含 .trae/documents/improve_custom_config_docs.md 的内容到仓库主目录的迁移——规划文档仍保留在 .trae/documents/ 下,作为本次变更的设计依据。

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval June 22, 2026 06:28 — with GitHub Actions Inactive
@github-actions github-actions Bot added the docs label Jun 22, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request significantly enhances the visibility and completeness of the 'custom configuration file' feature in AISBench. It introduces comprehensive documentation updates, including a detailed comparison with CLI usage, step-by-step guides, and cross-references across various tutorials and best practices. Additionally, multiple preset configuration examples for different evaluation scenarios (such as multi-model, multi-dataset, LLM judge, and performance benchmarks) have been added, and dataset READMEs have been updated with direct import statements. The reviewer feedback highlights a few areas for improvement: removing commented-out code in config_manager.py and model_api_test_zh_cn.py, and correcting a widespread Markdown table formatting issue in the dataset READMEs where column counts are mismatched.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval June 22, 2026 06:57 — with GitHub Actions Inactive
@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval June 22, 2026 07:20 — with GitHub Actions Inactive
@SJTUyh
SJTUyh had a problem deploying to smoke-test-approval August 21, 2026 06:53 — with GitHub Actions Error
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 7129 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval August 21, 2026 06:58 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 7128 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval August 21, 2026 09:17 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 7128 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval August 22, 2026 06:28 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 7148 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval August 24, 2026 02:58 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 7164 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh had a problem deploying to smoke-test-approval August 26, 2026 01:26 — with GitHub Actions Failure
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 6942 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@SJTUyh
SJTUyh temporarily deployed to smoke-test-approval August 26, 2026 02:09 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 6948 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 3 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

@github-actions

Copy link
Copy Markdown

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

未通过项:large_pr、review_opened

  • 超大 PR:新增代码 6948 行,超过 1000 行上限,建议拆分。
  • 检视意见未闭环:还存在 2 条未 Resolve 的检视意见,请全部 Resolve 后再合入。

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

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

Copy link
Copy Markdown

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

未通过项:large_pr

  • 超大 PR:新增代码 6948 行,超过 1000 行上限,建议拆分。

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

@SJTUyh
SJTUyh requested a review from Libotry August 26, 2026 02:36

@Libotry Libotry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

超大PR已评审,合入后补充备案

@Libotry
Libotry merged commit b1fb014 into AISBench:master Aug 26, 2026
6 of 9 checks passed

This branch was previously deployed

1 inactive deployment
smoke-test-approval — c55bc88a Deployed Aug 26, 2026 by SJTUyh via run_smoke_test_cases #621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs large_pr PR 新增代码超过 1000 行,建议拆分为更小的 PR other test-cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[需求] AISBench 压测工具增加像 Evalscope 中的SLA 自动调优设置

2 participants