Repository navigation
Conversation
|
Thanks for your contribution! |
There was a problem hiding this comment.
Pull request overview
本 PR 为 Hackathon 9th Sprint No.35 任务,旨在补充 fastdeploy/engine/common_engine.py 模块的单元测试覆盖率。主要添加了针对 EngineService 核心功能的测试用例,包括任务插入、预填充请求处理、分块更新、token 解码和 ZMQ 通信等关键路径的测试。
- 新增 10 个测试方法覆盖
common_engine.py中的各种边界条件和错误处理路径 - 添加辅助方法
_make_request和_make_minimal_engine简化测试对象创建 - 引入必要的导入(
types,Request,RequestOutput,envs)支持新测试
|
|
||
| def test_insert_prefilled_requests_error_and_success(self): | ||
| """Cover _insert_prefilled_requests branches for error_code != 200 and eos-handling.""" | ||
| from fastdeploy.engine.request import RequestOutput |
There was a problem hiding this comment.
RequestOutput is already imported at the top of the file (line 27). This local import is redundant and should be removed.
| from fastdeploy.engine.request import RequestOutput |
| from fastdeploy.utils import envs | ||
|
|
There was a problem hiding this comment.
The envs module is already imported at the top of the file (line 28). This local import is redundant and should be removed.
| from fastdeploy.utils import envs |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5665 +/- ##
==========================================
Coverage ? 18.80%
==========================================
Files ? 345
Lines ? 45095
Branches ? 6915
==========================================
Hits ? 8481
Misses ? 36109
Partials ? 505
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:
|
Motivation
No need
Modifications
No need
Usage or Command
No need
Accuracy Tests
No need
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.