[CI]【Hackathon 10th Spring No.29】engine unit test#6771
Open
cloudforge1 wants to merge 1 commit intoPaddlePaddle:developfrom
Open
[CI]【Hackathon 10th Spring No.29】engine unit test#6771cloudforge1 wants to merge 1 commit intoPaddlePaddle:developfrom
cloudforge1 wants to merge 1 commit intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
Contributor
Author
单测覆盖率数据develop 分支覆盖率
(数据来源: 本 PR 覆盖率本 PR 新增
覆盖率增量分析
新增覆盖的代码行:L98, L158-159, L179, L235, L294-299, L307-324, L327-337, L350-352, L381-384, L428-433, L450, L453-457, L492-494, L496-498, L551, L571, L628, L658, L661, L674-694, L707-736, L761-766, L770-774, L779, L787-799, L801-828, L836-839, L841-851, L853-880, L882-885, L888 本地 pytest --cov 输出 |
6 tasks
Add tests/engine/test_engine.py (469 lines, 14 tests) - monkeypatch + SimpleNamespace (no MagicMock) - object.__new__(LLMEngine) bypass for GPU-free testing - Local Coverage: 90% (430 stmts, 44 miss) - Develop baseline: 50% (official CSV) - 15 source methods covered
d34cfd8 to
dd3cdcf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6771 +/- ##
==========================================
Coverage ? 72.49%
==========================================
Files ? 394
Lines ? 54270
Branches ? 8502
==========================================
Hits ? 39341
Misses ? 12134
Partials ? 2795
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:
|
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
为
fastdeploy/engine/engine.py补充单元测试,提高模块覆盖率。Modifications
tests/engine/test_engine.py(469行,14个测试)TestLLMEngine类monkeypatch.setattr代替 MagicMock,使用SimpleNamespace构建真实配置对象object.__new__(LLMEngine)绕过__init__构建轻量实例(与金标准 PR [CI] 【Hackathon 10th Spring No.28】功能模块 fastdeploy/entrypoints/engine_client.py 单测补充 #6158 相同模式)start、from_engine_args、add_requests、_exit_sub_services、launch_components、_stop_profile、check_health、_worker_processes_ready、_init_worker_signals、_setting_environ_variables、_start_worker_service、generate、_get_generated_result、check_worker_initialize_status、_format_and_add_data、_has_guided_inputUsage or Command
Accuracy Tests
覆盖率数据
当前develop分支的单测覆盖率
fastdeploy/engine/engine.py(数据来源:
full_coverage_report.csv, develop 分支最新 CI)本 PR 覆盖率
本 PR 新增
tests/engine/test_engine.py(469行, 14 passed),本地pytest --cov结果:fastdeploy/engine/engine.py覆盖率增量分析
新增覆盖的代码行:L98, L158-159, L179, L235, L294-299, L307-324, L327-337, L350-352, L381-384, L428-433, L450, L453-457, L492-494, L496-498, L551, L571, L628, L658, L661, L674-694, L707-736, L761-766, L770-774, L779, L787-799, L801-828, L836-839, L841-851, L853-880, L882-885, L888
本地 pytest --cov 输出
对照金标准PR
Checklist
__init__which requires GPU subprocess)