-
Notifications
You must be signed in to change notification settings - Fork 624
[Test] Add new e2e test use deepseek-v2-lite in ge graph mode #3937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds end-to-end tests for the deepseek-v2-lite model in graph mode, which is a valuable addition for test coverage. The implementation is straightforward. I have one suggestion to refactor the newly added test functions using pytest.mark.parametrize to reduce code duplication and improve maintainability.
| def test_e2e_deepseekv2lite_with_torchair(): | ||
| additional_config = { | ||
| "torchair_graph_config": { | ||
| "enabled": True, | ||
| }, | ||
| } | ||
| _deepseek_v2_lite_torchair_test_fixure(additional_config) | ||
|
|
||
|
|
||
| def test_e2e_deepseekv2lite_with_torchair_ms_mla(): | ||
| additional_config = { | ||
| "torchair_graph_config": { | ||
| "enabled": True, | ||
| "enable_multistream_mla": True, | ||
| }, | ||
| } | ||
| _deepseek_v2_lite_torchair_test_fixure(additional_config) | ||
|
|
||
|
|
||
| def test_e2e_deepseekv2lite_with_torchair_v1scheduler(): | ||
| additional_config = { | ||
| "torchair_graph_config": { | ||
| "enabled": True, | ||
| }, | ||
| } | ||
| _deepseek_v2_lite_torchair_test_fixure(additional_config, | ||
| use_v1_schduler=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The three new test functions test_e2e_deepseekv2lite_with_torchair, test_e2e_deepseekv2lite_with_torchair_ms_mla, and test_e2e_deepseekv2lite_with_torchair_v1scheduler are very similar and contain duplicated code, especially the additional_config dictionary which is identical in two of the tests. This makes the tests harder to maintain, as future changes might be missed in one of the copies.
To improve maintainability and reduce code duplication, you can refactor these three functions into a single parameterized test using pytest.mark.parametrize. This will make the test suite cleaner and easier to extend with more configurations in the future.
As a minor note, the helper function _deepseek_v2_lite_torchair_test_fixure has a typo and should be renamed to _deepseek_v2_lite_torchair_test_fixture. The suggestion below uses the corrected name, so you will also need to rename the function definition at line 231.
@pytest.mark.parametrize(
"config_updates, use_v1_scheduler",
[
({}, False),
({"enable_multistream_mla": True}, False),
({}, True),
],
ids=[
"default",
"ms_mla",
"v1scheduler",
])
def test_e2e_deepseekv2lite_with_torchair(config_updates, use_v1_scheduler):
additional_config = {
"torchair_graph_config": {
"enabled": True,
},
}
additional_config["torchair_graph_config"].update(config_updates)
_deepseek_v2_lite_torchair_test_fixture(additional_config,
use_v1_schduler=use_v1_scheduler)…roject#3937) ### What this PR does / why we need it? The current test cases lack end-to-end (e2e) testing for the deepseek-v2-lite network in ge graph mode. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - vLLM version: v0.11.0 - vLLM main: vllm-project/vllm@83f478b --------- Signed-off-by: CodeNine-CJ <chenjian343@huawei.com> Signed-off-by: luolun <luolun1995@cmbchina.com>
…roject#3937) ### What this PR does / why we need it? The current test cases lack end-to-end (e2e) testing for the deepseek-v2-lite network in ge graph mode. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - vLLM version: v0.11.0 - vLLM main: vllm-project/vllm@83f478b --------- Signed-off-by: CodeNine-CJ <chenjian343@huawei.com> Signed-off-by: hwhaokun <haokun0405@163.com>
…roject#3937) ### What this PR does / why we need it? The current test cases lack end-to-end (e2e) testing for the deepseek-v2-lite network in ge graph mode. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - vLLM version: v0.11.0 - vLLM main: vllm-project/vllm@83f478b --------- Signed-off-by: CodeNine-CJ <chenjian343@huawei.com> Signed-off-by: nsdie <yeyifan@huawei.com>
What this PR does / why we need it?
The current test cases lack end-to-end (e2e) testing for the deepseek-v2-lite network in ge graph mode.
Does this PR introduce any user-facing change?
No
How was this patch tested?