Skip to content

Conversation

wangxiyuan
Copy link
Collaborator

@wangxiyuan wangxiyuan commented Jun 13, 2025

This PR added the unit test framework to enable ut for vLLM Ascend. Unit test runs on CPU machines. It'll be ran once lint check is passed the same as e2e test.

For unit test, this PR created a new folder called ut under tests module. All the test file in ut should keep the same with the code in vllm-ascend. The file name should be start with test_ prefix. For example, in this PR. the test_ascend_config.py is added for ascend_config.py test.

A new fille worker/test_worker_v1.py is also added as the placeholder. This file should be the unit test for vllm-ascend/worker/worker_v1.py.

Additional, a new fake_weight folder is added, it contains the config.json from facebook/opt-125m, so that the test will not always visit huggingface.

TODO:
We should add all the unit test file one by one in the future.

@wangxiyuan wangxiyuan force-pushed the add_ut_framwork branch 5 times, most recently from db86f0d to 1eb66c1 Compare June 13, 2025 06:08
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@wangxiyuan
Copy link
Collaborator Author

After the refactor, the test workflow will be like:

image

@wangxiyuan wangxiyuan force-pushed the add_ut_framwork branch 8 times, most recently from b463c0a to 860fbb4 Compare June 16, 2025 07:25
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
@Yikun Yikun added ready read for review long-term-test enable long term test for PR ready-for-test start test by label for PR labels Jun 16, 2025
@wangxiyuan wangxiyuan merged commit 69b817e into vllm-project:main Jun 16, 2025
36 checks passed
@wangxiyuan wangxiyuan deleted the add_ut_framwork branch June 27, 2025 01:17
shiyuan680 pushed a commit to raindaywhu/vllm-ascend that referenced this pull request Jul 7, 2025
This PR added the unit test framework to enable ut for vLLM Ascend. Unit
test runs on CPU machines. It'll be ran once lint check is passed the
same as e2e test.

For unit test, this PR created a new folder called `ut` under `tests`
module. All the test file in `ut` should keep the same with the code in
`vllm-ascend`. The file name should be start with `test_` prefix. For
example, in this PR. the `test_ascend_config.py` is added for
`ascend_config.py` test.

A new fille `worker/test_worker_v1.py` is also added as the placeholder.
This file should be the unit test for `vllm-ascend/worker/worker_v1.py`.

Additional, a new `fake_weight` folder is added, it contains the
config.json from `facebook/opt-125m`, so that the test will not always
visit huggingface.

TODO:
We should add all the unit test file one by one in the future.

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
chopper0126 pushed a commit to chopper0126/vllm-ascend that referenced this pull request Oct 16, 2025
This PR added the unit test framework to enable ut for vLLM Ascend. Unit
test runs on CPU machines. It'll be ran once lint check is passed the
same as e2e test.

For unit test, this PR created a new folder called `ut` under `tests`
module. All the test file in `ut` should keep the same with the code in
`vllm-ascend`. The file name should be start with `test_` prefix. For
example, in this PR. the `test_ascend_config.py` is added for
`ascend_config.py` test.

A new fille `worker/test_worker_v1.py` is also added as the placeholder.
This file should be the unit test for `vllm-ascend/worker/worker_v1.py`.

Additional, a new `fake_weight` folder is added, it contains the
config.json from `facebook/opt-125m`, so that the test will not always
visit huggingface.

TODO:
We should add all the unit test file one by one in the future.

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

long-term-test enable long term test for PR module:core module:tests ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants