[CI] 【Hackathon 9th Sprint No.21】NO.21 功能模块单测补充 by xunyoyo · Pull Request #5066 · PaddlePaddle/FastDeploy (original) (raw)
Add unit tests for Triton fused MoE backends with stubs for GPU/operator functionality.
Motivation
NO.21 功能模块 fastdeploy/model_executor/layers/moe/fused_moe_triton_backend.py 单测补充
Modifications
add tests/model_executor/test_fused_moe_triton_backend.py
Usage or Command
tests/model_executor/test_fused_moe_triton_backend.py:
python -m coverage run -m unittest tests.model_executor.test_fused_moe_triton_backend
&& python -m coverage report -m --include='fastdeploy/model_executor/layers/moe/fused_moe_triton_backend.py'
Accuracy Tests
tests/model_executor/test_fused_moe_triton_backend.py:
Name Stmts Miss Cover Missing
fastdeploy/model_executor/layers/moe/fused_moe_triton_backend.py 442 66 85% 38-39, 62, 207-208, 270, 309, 459, 503- 514, 586-648, 654-658, 691, 1151, 1197-1208, 1239-1254, 1405, 1408-1411, 1415-1429
TOTAL 442 66 85%
Checklist
- 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: [
- Format your code, run
pre-commitbefore commit. - Add unit tests. Please write the reason in this PR if no unit tests.
- Provide accuracy results.
- 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.