Skip to content

Commit 6a1c510

Browse files
committed
fix
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 953a2b7 commit 6a1c510

File tree

2 files changed

+41
-25
lines changed

2 files changed

+41
-25
lines changed

.github/workflows/accuracy_test.yaml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
# This file is a part of the vllm-ascend project.
1616
#
1717

18-
name: Accuracy Tests
18+
name: Benchmarks / accuracy
1919

2020
on:
21+
pull_request:
22+
types: [ labeled ]
2123
workflow_dispatch:
2224
inputs:
2325
vllm-version:
@@ -26,10 +28,8 @@ on:
2628
type: choice
2729
options:
2830
- main
31+
- v0.9.0.1
2932
- v0.9.0
30-
- v0.8.5.post1
31-
- v0.8.5
32-
- v0.8.4
3333
- v0.7.3
3434
vllm-ascend-version:
3535
description: 'vllm-ascend version:'
@@ -38,22 +38,14 @@ on:
3838
options:
3939
- main
4040
- v0.7.3-dev
41-
- v0.7.3
42-
- v0.8.5rc1
43-
- v0.8.4rc2
44-
- v0.8.4rc1
45-
- v0.7.3rc2
46-
- v0.7.3rc1
4741
models:
4842
description: 'model:'
4943
required: true
5044
type: choice
5145
options:
5246
- all
5347
- Qwen/Qwen2.5-7B-Instruct
54-
- meta-llama/Llama-3.1-8B-Instruct
5548
- Qwen/Qwen2.5-VL-7B-Instruct
56-
- Qwen/Qwen3-8B-Base
5749
default: 'all'
5850

5951
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
@@ -65,16 +57,31 @@ defaults:
6557

6658
jobs:
6759
model_tests:
60+
# test will be triggered when tag '*-accuracy-test' & 'ready-for-test' or schedule job
61+
if: >-
62+
${{
63+
(contains(github.event.pull_request.labels.*.name, 'vl-accuracy-test') ||
64+
contains(github.event.pull_request.labels.*.name, 'dense-accuracy-test')) &&
65+
contains(github.event.pull_request.labels.*.name, 'ready-for-test') ||
66+
github.event_name == 'workflow_dispatch'
67+
}}
6868
name: Model Test - ${{ matrix.model_name }}
6969
runs-on: 'linux-arm64-npu-2'
7070
strategy:
7171
matrix:
72+
# the accuracy test will run:
73+
# 1. workflow_dispatch with models input
74+
# - all: Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
75+
# - specified but not all: Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
76+
# 2. PR labeled with "*-accuracy-test"
77+
# - dense-accuracy-test: Qwen/Qwen2.5-7B-Instruct
78+
# - vl-accuracy-test: Qwen/Qwen2.5-VL-7B-Instruct
7279
include: ${{ fromJSON(
73-
(github.event.inputs.models == 'all' && '[{"model_name":"Qwen/Qwen2.5-7B-Instruct","output_file":"Qwen2.5-7B-Instruct"},{"model_name":"meta-llama/Llama-3.1-8B-Instruct","output_file":"Llama-3.1-8B-Instruct"},{"model_name":"Qwen/Qwen2.5-VL-7B-Instruct","output_file":"Qwen2.5-VL-7B-Instruct"}, {"model_name":"Qwen/Qwen3-8B-Base","output_file":"Qwen3-8B-Base"}]') ||
74-
(github.event.inputs.models == 'Qwen/Qwen2.5-7B-Instruct' && '[{"model_name":"Qwen/Qwen2.5-7B-Instruct","output_file":"Qwen2.5-7B-Instruct"}]') ||
75-
(github.event.inputs.models == 'meta-llama/Llama-3.1-8B-Instruct' && '[{"model_name":"meta-llama/Llama-3.1-8B-Instruct","output_file":"Llama-3.1-8B-Instruct"}]') ||
76-
(github.event.inputs.models == 'Qwen/Qwen2.5-VL-7B-Instruct' && '[{"model_name":"Qwen/Qwen2.5-VL-7B-Instruct","output_file":"Qwen2.5-VL-7B-Instruct"}]') ||
77-
(github.event.inputs.models == 'Qwen/Qwen3-8B-Base' && '[{"model_name":"Qwen/Qwen3-8B-Base","output_file":"Qwen3-8B-Base"}]')
80+
(github.event.inputs.models == 'all' && '[{"model_name":"Qwen/Qwen2.5-7B-Instruct"},{"model_name":"meta-llama/Llama-3.1-8B-Instruct"},{"model_name":"Qwen/Qwen2.5-VL-7B-Instruct"}, {"model_name":"Qwen/Qwen3-8B-Base"}]') ||
81+
(github.event.inputs.models == 'Qwen/Qwen2.5-7B-Instruct' && '[{"model_name":"Qwen/Qwen2.5-7B-Instruct"}]') ||
82+
(github.event.inputs.models == 'Qwen/Qwen2.5-VL-7B-Instruct' && '[{"model_name":"Qwen/Qwen2.5-VL-7B-Instruct"}]') ||
83+
contains(github.event.pull_request.labels.*.name, 'dense-accuracy-test') && '[{"model_name":"Qwen/Qwen2.5-7B-Instruct"}]' ||
84+
contains(github.event.pull_request.labels.*.name, 'vl-accuracy-test') && '[{"model_name":"Qwen/Qwen2.5-VL-7B-Instruct"}]'
7885
) }}
7986
fail-fast: false
8087

@@ -84,6 +91,7 @@ jobs:
8491
HF_ENDPOINT: https://hf-mirror.com
8592
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8693
DATASET_SOURCE: ModelScope
94+
VLLM_USE_MODELSCOPE: True
8795

8896
steps:
8997
- name: Checkout repository
@@ -112,18 +120,20 @@ jobs:
112120
with:
113121
repository: vllm-project/vllm
114122
path: ./vllm-empty
115-
ref: ${{ github.event.inputs.vllm-version }}
123+
# Please also change this when bump matched version
124+
ref: ${{ github.event.inputs.vllm-version || 'v0.9.0' }}
116125

117126
- name: Install vllm-project/vllm from source
118127
working-directory: ./vllm-empty
119128
run: VLLM_TARGET_DEVICE=empty pip install -e .
120-
121129

122130
- name: Checkout vllm-project/vllm-ascend repo
123131
uses: actions/checkout@v4
124132
with:
125133
repository: vllm-project/vllm-ascend
126134
path: ./vllm-ascend
135+
# 1. If version specified (work_dispatch), do specified branch test
136+
# 2. If no version (labeled PR), do PR accuracy test
127137
ref: ${{ github.event.inputs.vllm-ascend-version }}
128138
fetch-depth: 0
129139

@@ -133,7 +143,7 @@ jobs:
133143
pip install -r requirements-dev.txt
134144
pip install -e .
135145
136-
- name: Install EleutherAI/lm-evaluation-harness
146+
- name: Install lm-eval, ray, and datasets
137147
run: |
138148
pip install lm-eval ray datasets==2.16.0
139149
@@ -166,26 +176,32 @@ jobs:
166176
echo "vLLM: ${{ env.VLLM_VERSION }}"
167177
168178
- name: Run Accuracy Test for V0
179+
id: report
169180
working-directory: ./benchmarks
170181
env:
171182
VLLM_USE_V1: 0
172183
PYTORCH_NPU_ALLOC_CONF: max_split_size_mb:256
173184
run: |
185+
model_base_name=$(basename ${{ matrix.model_name }})
186+
echo "model_base_name=$model_base_name"
187+
echo "model_base_name=$model_base_name" >> $GITHUB_OUTPUT
174188
mkdir -p ./accuracy/V0
189+
echo "test111" > ./accuracy/V0/${model_base_name}.md
175190
python ./scripts/run_accuracy.py \
176191
--model "${{ matrix.model_name }}" \
177-
--output "./accuracy/V0/${{ matrix.output_file }}.md" \
178-
--vllm_ascend_version "${{ github.event.inputs.vllm-ascend-version }}" \
192+
--output "./accuracy/V0/${model_base_name}.md" \
193+
--vllm_ascend_version "${{ github.event.inputs.vllm-ascend-version || 'current' }}" \
179194
--cann_version "${{ env.CANN_VERSION }}" \
180195
--torch_npu_version "${{ env.TORCH_NPU_VERSION }}" \
181196
--torch_version "${{ env.TORCH_VERSION }}" \
182197
--vllm_version "${{ env.VLLM_VERSION }}"
198+
cat ./accuracy/V0/${model_base_name}.md
183199
184200
- name: Upload Report for V0
185201
uses: actions/upload-artifact@v4
186202
with:
187-
name: "${{ github.event.inputs.vllm-ascend-version }}-${{ matrix.output_file }}-V0-report"
188-
path: ./benchmarks/accuracy/V0/${{ matrix.output_file }}.md
203+
name: "${{ github.event.inputs.vllm-ascend-version }}-${{ steps.report.outputs.model_base_name }}-V0-report"
204+
path: ./benchmarks/accuracy/V0/${{ steps.report.outputs.model_base_name }}.md
189205
if-no-files-found: warn
190206
retention-days: 90
191207
overwrite: true

.github/workflows/vllm_ascend_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ on:
2727
paths:
2828
- '*.txt'
2929
- '**/*.py'
30-
- '.github/workflows/vllm_ascend_test.yaml'
3130
- '!docs/**'
3231
- 'pytest.ini'
32+
- '!benchmarks/**'
3333
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
3434
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
3535
# It's used to activate ascend-toolkit environment variables.

0 commit comments

Comments
 (0)