[CI] 【Hackathon 9th Sprint No.38】NO.38 功能模块单测补充
This file contains tests for the global scheduler, including request handling, load accounting, and response management.
Motivation
NO.38 功能模块 fastdeploy/scheduler/global_scheduler.py 单测补充
Modifications
new dir and add tests/scheduler/test_global_scheduler.py
Usage or Command
tests/scheduler/test_global_scheduler.py:
python -m coverage run -m unittest tests.scheduler.test_global_scheduler \
&& python -m coverage report -m --include='fastdeploy/scheduler/global_scheduler.py'
Accuracy Tests
原来的覆盖:
tests/scheduler/test_global_scheduler.py:
Name Stmts Miss Cover Missing
------------------------------------------------------------------------
fastdeploy/scheduler/global_scheduler.py 369 62 83% 200-202, 214-215, 231-241, 332, 424-429, 440-441, 499-502, 511,
520, 532-533, 542-543, 556-561, 576, 601, 652, 681-682, 699-730, 774-775
------------------------------------------------------------------------
TOTAL 369 62 83%
覆盖 ++268 行
Checklist
- [x] Add at least a tag in the PR title.
- Tag list: [
[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]] - You can add new tags based on the PR content, but the semantics must be clear.
- Tag list: [
- [x] Format your code, run
pre-commitbefore commit. - [x] Add unit tests. Please write the reason in this PR if no unit tests.
- [x] Provide accuracy results.
- [x] If the current PR is submitting to the
releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.
Thanks for your contribution!
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:warning: Please upload report for BASE (develop@d739af5). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## develop #5060 +/- ##
==========================================
Coverage ? 64.43%
==========================================
Files ? 329
Lines ? 41756
Branches ? 6388
==========================================
Hits ? 26906
Misses ? 12798
Partials ? 2052
| Flag | Coverage Δ | |
|---|---|---|
| GPU | 64.43% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
1.可以参考下 copilot 给出的建议 2.需要增加一些注释
@xunyoyo Please confirm your changes carefully and avoid triggering the job repeatedly. Otherwise, trigger permissions may be revoked.
@lddfym 麻烦review~
代码中的注释请改用英文吧,和整体代码风格保持一致
@lddfym 已修改
LGTM
0.3⭐️ @luotao1