Repository navigation
[Docs] Add recommand instruction for custom configs - #349
Conversation
There was a problem hiding this comment.
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.
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
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 #294
🔍 变更动机 / Motivation
custom_cfg分支相对master_center重写了文档体系(含大量英文场景文档),但与现有代码状态存在明显不一致:performance_*.py8 个样例未创建;代码中虚构 API(vLLMCausalLM、GenericDataset、伪造SyntheticDataset参数、顶层request_rate/num_prompts变量、不存在的--urlCLI 参数);文档中大量*_zh_cn.py中文注释样例但英文文档全部直接引用。datasets.md已被迁移到get_started/但大量文档仍指向all_params/;MySTgithub_slugify锚点规则(标题改名、&→--)导致数十个锚点无法解析;新增的"各场景自定义配置文件示例"章节未被导航/相关场景文档引用。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)
<<<<<<< HEAD/=======/>>>>>>> master_center)vLLMCausalLM、GenericDataset、AccuracyEvaluator、伪造SyntheticDataset参数、顶层request_rate/num_prompts/stats_list)替换为仓库实际存在的真实 APIais_bench/configs/performance_benchmark/performance_*.pysummarizer配置示例3. 完善 run_custom_config.md(中英文)
.copy()、环境变量条件)、"Complete Configuration File Variable Reference"(models/datasets/summarizer/model_dataset_combinations/work_dir/infer/eval)、"Custom Configuration File Examples for Each Scenario"(10 个场景完整示例代码)GenericDataset→ 真实CustomDataset、AccuracyEvaluator→AccEvaluator4. 修复文档间索引(25+ 处)
系统性修正以下问题:
all_params/datasets.md→get_started/datasets.md,并修正对应锚点(synthetic-dataset→randomly-synthesized-datasets、configure-→configuring-)#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(中英)#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 文档的两个标签页链接改为纯文本指引longbenchqmsum_gen.py→longbenchqmsum/longbench_qmsum_gen.py)、SuperGLUE_BoolQ(_gen_883d50_str→_gen_0_shot_noncot_str)doc/users_guide/失效路径 →docs/source_{zh_cn|en}/...开源数据集/配置开源数据集(确认为现有标题);accuracy_metric.md#ii-definitions-and-relationships-of-passk-consk-and-avgn5. 配套修改
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
python -m py_compile语法检查github_slugify精确算法实现):原 71 处问题全部修复至 0 项真实问题(剩余 8 项为"仅报告"项:models.md的vllm_api_old行引用已删除的类/默认配置;develop_guide/new_dataset.md为模板占位符示例链接)样例+文档样例执行验证报告:
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
无。这是纯文档 + 新增样例 + 1 行 CLI 配置校验弱化的变更,未改动 API、配置 schema、CLI 参数。
config_manager.py的_check_summarizer_config()调用被移除,意味着自定义配置文件中不显式包含summarizer字段时不再视为错误——这与run_custom_config.md中"summarizer 可省略"的教学描述一致。如果下游项目依赖summarizer必须存在的隐式校验,需要在自己的检查逻辑中补回。当前仓库 CLI 默认会注入examplesummarizer(见config_manager.py:_load_summarizers_config),所以默认值行为不变。无。文档与样例变更不影响运行时性能。
🌟 使用案例 / Use cases
新样例覆盖以下典型场景(详见 run_custom_config.md "Custom Configuration File Examples for Each Scenario"):
infer_vllm_api_multi_model_multi_dataset.py)infer_vllm_api_with_judge_model.py)perf_vllm_api_synthetic.py)perf_vllm_api_stable_stage.py)perf_vllm_api_multiturn.py)perf_vllm_api_custom_dataset.py)perf_vllm_api_rps_distribution.py)infer_hf_multi_model_multi_dataset.py)infer_lmm_multi_dataset.py)✅ 检查列表 / Checklist
Before PR:
python -m py_compilerun_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等警告👥 协作信息 / Collaboration Info
.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/gemini summary/readthedocs build/pr_check