[BugFix] fix init RequestOutput - #5419
Merged
Merged
Conversation
|
Thanks for your contribution! |
Contributor
There was a problem hiding this comment.
Pull request overview
此 PR 修复了在 PD(Prefill-Decode)分离场景下构造 RequestOutput 对象时的错误,同时添加了解码资源分配的时间指标记录。
主要变更:
- 修改
RequestOutput.from_dict方法以安全处理可能缺失或为 None 的outputs和metrics字段 - 修正了
insert_tasks中解码资源分配成功时的处理逻辑 - 添加了解码资源请求的开始和完成时间的指标记录
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| fastdeploy/engine/request.py | 添加了对 outputs 和 metrics 字段的条件检查,避免在字段缺失时反序列化失败 |
| fastdeploy/engine/common_engine.py | 修正了解码资源分配成功时的逻辑分支,添加了 ask_decode_resource_start_time 和 ask_decode_resource_finish_time 指标 |
关于 PR 描述的建议:
- PR 标题格式正确:使用了
[BugFix]标签 - 描述中的"修复PD 分离下构造RequestOutput错误"较为简洁,建议补充更详细的背景信息,例如:
- 什么场景下会出现此问题?
- 错误的具体表现是什么?
- 如何复现该问题?
- 建议说明为何需要添加这两个时间指标(
ask_decode_resource_start_time和ask_decode_resource_finish_time)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5419 +/- ##
==========================================
Coverage ? 58.69%
==========================================
Files ? 327
Lines ? 40653
Branches ? 6173
==========================================
Hits ? 23860
Misses ? 14950
Partials ? 1843
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Jiang-Jia-Jun
approved these changes
Dec 9, 2025
chang-wenbin
pushed a commit
to chang-wenbin/FastDeploy
that referenced
this pull request
Mar 2, 2026
* fix init RequestOutput * up * fix * fix
xiaoguoguo626807
pushed a commit
to xiaoguoguo626807/FastDeploy
that referenced
this pull request
May 7, 2026
* fix init RequestOutput * up * fix * fix
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.
Motivation
修复PD 分离下构造RequestOutput错误
Modifications
RequestOutput.from_dict
Usage or Command
无
Accuracy Tests
无
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.