Repository navigation
Conversation
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
Keithwwa
temporarily deployed
to
smoke-test-approval
November 11, 2026 12:30 — with
GitHub Actions
Inactive
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 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 编号)
🔍 Motivation / 变更动机
📝 Modification / 修改内容
📐 Associated Test Results / 关联测试结果
AISBench
prefill-concurrency功能验证报告prefill_concurrency/--prefill-concurrency参数及相关调度、异常释放逻辑/home/wangjianxin/benchmark77db1a8360875f1558d298c04e51b264649b8b57(77db1a8 补充参数配置异常处理)+2/-1行差异,其余本报告相关被测文件无内容差异1. 验证目标
验证 AISBench 新增 Prefill 并发限制功能是否满足以下要求:
K。K。prefill_wait_time。K=0保持功能关闭;K > batch_size只告警,不误报配置错误。max_inflight、inflight、waiting,用于判断上限是否生效及许可是否泄漏。3. 验证环境与方法
3.1 环境
/tmp隔离虚拟环境aiohttp 3.14.5pytest 9.2.0127.0.0.1:1800089113.2 验证层次
aiohttpTCP/HTTP/SSE 通信注入 503、连接重置、非法 JSON、空流、流不结束及取消。TestPrefillConcurrency和配置校验相关 UT。build_model_from_cfg和 CLI 覆盖方法;以 mock registry 观察非法配置是否在模型构造前失败。3.3 验证边界
127.0.0.1:8000已被其他 HTTP 服务占用,因此本次代理使用127.0.0.1:18000;代理自行返回正常 SSE,不依赖 vLLM 构造异常。torch/numpy等依赖。专项 UT 仅对与限流无关的重型包入口使用轻量 stub;被测实现和 UT 源码均未修改。本报告不声称执行了全量 UT。4. 统一判定标准
4.1 异常与重试用例
除各用例特定判定外,统一要求:
K=1。inflight=0、waiting=0。4.2 配置校验用例
MODELS.build不得被调用,从而保证不会进入正式模型推理。5. 异常与重试用例详细结果
5.1 结果汇总
retry=2session.post;两个等待时间ok;prefill_wait_time长度为 2retry=3inflight=0;后续任务不等待data: {bad json}error_info记录异常;无重复释放;后续正常请求成功BoundedSemaphore重复释放;全局上限正确first已解析;异常被记录;许可仍可获取;后续请求成功finally归还;任务可退出;无残留线程E 类汇总:8/8 通过。所有用例最终均为
inflight=0、waiting=0,且无残留 executor 线程。5.2 关键路径分析
E02:重试不能复用已失效 lease
实测第一次连接重置后,第二次 HTTP 尝试重新执行 acquire,因此产生两个
prefill_wait_time。这与 base_api.py 的重试循环及每次stream_infer创建 lease 的实现一致,可避免第一次尝试持有的许可污染第二次尝试。E04/E05:解析异常不能造成双重释放
首数据块到达后会主动释放 Prefill 许可,随后解析 JSON;
finally中再次调用release()时由held状态保证幂等。E04(首 Token 前)和 E05(首 Token 后)均未出现BoundedSemaphore过度释放,后续正常请求成功。E07/E08:取消语义完整
finally路径保证许可不残留。6. 配置校验用例详细结果
prefill_concurrency=-1prefill_concurrency must be a non-negative integerprefill_concurrency=Truebool未被接受prefill_concurrency=1.5prefill_concurrency="8"stream=False, K=2stream=Trueprefill_concurrency requires stream=TrueK=2, request_rate=10prefill_concurrency=2 conflicts with request_rate/traffic_cfgK=2且启用traffic_cfguse_timestamp=True, K=2use_timestamp=True conflicts with prefill_concurrency=2K=0, request_rate=10--prefill-concurrency 4prefill_concurrency=4;历史 K=4 完整运行达到max_inflight=4K=32, batch_size=4prefill_concurrency (32) exceeds batch_size (4);模型构造继续V 类汇总:10/10 场景通过;V02 的三个数据子项均通过。V01–V07 均在模型构造前失败。
V07 实际冲突信息
符合“一次报错列出全部冲突,而不是只报告第一组”的要求。
7. 专项单元测试结果
7.1 限流与异常路径
执行对象:
test_base_api.py 中的
TestPrefillConcurrency。结果:
覆盖内容:
K正确性7.2 配置校验
执行对象:
test_build.py 中
test_prefill_concurrency_validation和test_schedule_mode_conflicts。结果:
专项 UT 汇总:10 个测试方法通过,另有 12 个子测试通过;未执行与本次功能无关的全量 UT。
8. outputs 历史完整运行证据
8.1 结果汇总
20261109_09270320261109_09305520261109_09555820261110_01230120261110_02581920261110_03004520261110_03013720261110_03072320261110_03182720261110_0346248.2 关键日志证据
K=4 上限与结束回收
20261110_034624 推理日志:
20261109_092703 推理日志 同样记录
limit=4, max_inflight=4, inflight=0, waiting=0。K=2 与 K=1
limit=2, max_inflight=2, inflight=0, waiting=0。limit=1, max_inflight=1, inflight=0, waiting=0。这些结果同时证明:上限能够达到但未超过,运行结束后无许可和等待者残留。
调度冲突快速失败
20261110_031827 推理日志:
该次在 inferencer/模型构造阶段失败,未生成性能结果,与 V04 的配置校验结果一致。
8.3 结果解释
9. 需求—证据追踪矩阵
K20261110_031827K=0兼容 Request Ratemax_inflight/inflight/waiting10. 缺陷与验证过程问题
10.1 产品缺陷
10.2 验证脚本问题及处理
验证早期出现过两类 harness 问题:测试子类未初始化实际 URL,以及代理
StreamResponse的 Content-Type 参数写法不适配当前aiohttp。两者均导致请求未按预期到达故障分支,已在验证脚本中修正并重新执行完整回归。上述问题均位于临时验证脚本,不在 AISBench 产品代码中,不计为产品缺陷。最终结果取自修正后的完整回归,而非中间失败轮次。
11. 风险与后续建议
11.1 功能修改建议
无。本轮未发现需要修改
prefill-concurrency功能实现的问题。11.2 测试补齐建议
以下属于验证范围补齐,不是已知产品缺陷:
12. 最终结论
综上,
prefill-concurrency的参数校验、CLI 注入、全局限流、重试、异常释放、取消回收及运行状态观测均符合本轮用例预期。历史完整 CLI 结果与本次专项验证相互印证,可支撑代码检视和功能验收。Does the modification introduce changes that break the backward compatibility of the downstream repositories? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
是否引入了会破坏下游存储库向后兼容性的更改?如果是,请描述它如何破坏兼容性,以及下游项目应该如何修改其代码以保持与此 PR 的兼容性。
If the modification introduces performance degradation, please describe the impact of the performance degradation and the expected performance improvement.
如果引入了性能下降,请描述性能下降的影响和预期的性能改进。
🌟 Use cases (Optional) / 使用案例(可选)
If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。
✅ Checklist / 检查列表
Before PR:
After PR:
👥 Collaboration Info / 协作信息
🌟 Useful CI Command / 实用的CI命令
/gemini review/gemini summary/gemini help/readthedocs build/pr_check