Skip to content

Enable pytest and yaml style accuracy test#2073

Merged
Yikun merged 36 commits intovllm-project:mainfrom
wxsIcey:new_acc_test
Jul 31, 2025
Merged

Enable pytest and yaml style accuracy test#2073
Yikun merged 36 commits intovllm-project:mainfrom
wxsIcey:new_acc_test

Conversation

@wxsIcey
Copy link
Collaborator

@wxsIcey wxsIcey commented Jul 28, 2025

What this PR does / why we need it?

This PR enabled pytest and yaml style accuracy test, users now can enable accuracy test by running:

cd ~/vllm-ascend
pytest -sv ./tests/e2e/singlecard/models/test_lm_eval_correctness.py \
          --config ./tests/e2e/singlecard/models/configs/Qwen3-8B-Base.yaml \
          --report_output ./benchmarks/accuracy/Qwen3-8B-Base.md

pytest -sv ./tests/e2e/singlecard/models/test_lm_eval_correctness.py \
          --config-list-file ./tests/e2e/singlecard/models/configs/accuracy.txt

Closes: #1970

Does this PR introduce any user-facing change?

no

How was this patch tested?

@github-actions github-actions bot added documentation Improvements or additions to documentation module:tests labels Jul 28, 2025
@wxsIcey wxsIcey added accuracy-new-test ready-for-test start test by label for PR and removed accuracy-new-test ready-for-test start test by label for PR labels Jul 28, 2025
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.05%. Comparing base (72eceff) to head (3d98cf4).
⚠️ Report is 613 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2073      +/-   ##
==========================================
+ Coverage   74.41%   75.05%   +0.63%     
==========================================
  Files         100      103       +3     
  Lines       11208    11355     +147     
==========================================
+ Hits         8340     8522     +182     
+ Misses       2868     2833      -35     
Flag Coverage Δ
unittests 75.05% <ø> (+0.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wxsIcey wxsIcey added accuracy-new-test ready-for-test start test by label for PR and removed ready-for-test start test by label for PR accuracy-new-test labels Jul 29, 2025
wxsIcey added 21 commits July 31, 2025 02:06
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Copy link
Member

@Yikun Yikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +14 to +15
- linux-aarch64-a2-1
- linux-aarch64-a2-2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

env_config):
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template(
"./tests/e2e/singlecard/models/report_template.md")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use relative path to make sure we can execute the pytest in any path?

https://github.com/vllm-project/vllm-ascend/blob/main/tests/e2e/conftest.py#L64

wxsIcey added 3 commits July 31, 2025 09:35
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: Icey <1790571317@qq.com>
# test will be triggered when tag '*-accuracy-test' & 'ready-for-test' or workflow_dispatch job
if: >-
${{
contains(github.event.pull_request.labels.*.name, 'accuracy-new-test') &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
contains(github.event.pull_request.labels.*.name, 'accuracy-new-test') &&
contains(github.event.pull_request.labels.*.name, 'accuracy-test') &&

help="Path to the model config YAML file",
)
parser.addoption(
"--report_output",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can change this to report_path and the name should be same as yaml.model_name, then --config-list-file will make sense when specify report_path

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem will be solved by #2163

@Yikun
Copy link
Member

Yikun commented Jul 31, 2025

Let's merge this first, and do some fixes in a separate PR when adding --config-list-file yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accuracy-test enable all accuracy test for PR documentation Improvements or additions to documentation module:tests ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: Refactor accuracy test CI

4 participants