Skip to content

Commit 925914d

Browse files
author
yangcheng (AJ)
committed
update
1 parent 0a5b075 commit 925914d

File tree

130 files changed

+10562
-1675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+10562
-1675
lines changed

.github/workflows/accuracy_test.yaml

Lines changed: 162 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
name: Benchmarks / accuracy
2323

2424
on:
25+
schedule:
26+
# Runs every 6 hours
27+
- cron: '0 */6 * * *'
2528
pull_request:
2629
types: [ labeled ]
2730
workflow_dispatch:
@@ -34,6 +37,7 @@ on:
3437
# Current supported vLLM versions
3538
options:
3639
- main
40+
- v0.9.2
3741
- v0.9.1
3842
- v0.7.3
3943
vllm-ascend-version:
@@ -42,16 +46,17 @@ on:
4246
type: choice
4347
options:
4448
- main
49+
- v0.9.1-dev
4550
- v0.7.3-dev
4651
models:
4752
description: 'model:'
4853
required: true
4954
type: choice
5055
options:
5156
- all
52-
- Qwen/Qwen2.5-7B-Instruct
5357
- Qwen/Qwen2.5-VL-7B-Instruct
5458
- Qwen/Qwen3-8B-Base
59+
- Qwen/Qwen3-30B-A3B
5560
default: 'all'
5661

5762
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
@@ -73,56 +78,57 @@ jobs:
7378
${{
7479
(contains(github.event.pull_request.labels.*.name, 'accuracy-test') ||
7580
contains(github.event.pull_request.labels.*.name, 'vl-accuracy-test') ||
81+
contains(github.event.pull_request.labels.*.name, 'moe-accuracy-test') ||
7682
contains(github.event.pull_request.labels.*.name, 'dense-accuracy-test')) &&
7783
contains(github.event.pull_request.labels.*.name, 'ready-for-test') ||
78-
github.event_name == 'workflow_dispatch'
84+
github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
7985
}}
8086
runs-on: >-
8187
${{
82-
(matrix.model_name == 'Qwen/Qwen2.5-VL-7B-Instruct' && 'linux-arm64-npu-4') ||
88+
(matrix.model_name == 'Qwen/Qwen3-30B-A3B' && 'linux-arm64-npu-4') ||
8389
'linux-arm64-npu-2'
8490
}}
8591
strategy:
8692
matrix:
87-
vllm_use_version: [0, 1]
93+
vllm_use_version: [1]
8894
# the accuracy test will run:
8995
# 1. workflow_dispatch with models input
90-
# - all: Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
91-
# - specified but not all: Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
96+
# - all: Qwen/Qwen3-30B-A3B, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
97+
# - specified but not all: Qwen/Qwen3-30B-A3B, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-8B-Base
9298
# 2. PR labeled with "*-accuracy-test"
93-
# - accuracy-test: Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct
94-
# - dense-accuracy-test: Qwen/Qwen2.5-7B-Instruct
99+
# - accuracy-test: Qwen/Qwen3-8B-Base, Qwen/Qwen2.5-VL-7B-Instruct, Qwen/Qwen3-30B-A3B
100+
# - dense-accuracy-test: Qwen/Qwen3-8B-Base
95101
# - vl-accuracy-test: Qwen/Qwen2.5-VL-7B-Instruct
102+
# - moe-accuracy-test: Qwen/Qwen3-30B-A3B
96103
model_name: ${{ fromJSON(
104+
(github.event_name == 'schedule' &&
105+
'["Qwen/Qwen3-30B-A3B","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-8B-Base"]') ||
97106
(github.event.inputs.models == 'all' &&
98-
'["Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-8B-Base"]') ||
99-
(github.event.inputs.models == 'Qwen/Qwen2.5-7B-Instruct' &&
100-
'["Qwen/Qwen2.5-7B-Instruct"]') ||
107+
'["Qwen/Qwen3-30B-A3B","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-8B-Base"]') ||
108+
(github.event.inputs.models == 'Qwen/Qwen3-30B-A3B' &&
109+
'["Qwen/Qwen3-30B-A3B"]') ||
101110
(github.event.inputs.models == 'Qwen/Qwen2.5-VL-7B-Instruct' &&
102111
'["Qwen/Qwen2.5-VL-7B-Instruct"]') ||
103112
(github.event.inputs.models == 'Qwen/Qwen3-8B-Base' &&
104113
'["Qwen/Qwen3-8B-Base"]') ||
105114
contains(github.event.pull_request.labels.*.name, 'accuracy-test') &&
106-
'["Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct"]' ||
115+
'["Qwen/Qwen3-8B-Base","Qwen/Qwen2.5-VL-7B-Instruct", "Qwen/Qwen3-30B-A3B"]' ||
107116
contains(github.event.pull_request.labels.*.name, 'dense-accuracy-test') &&
108-
'["Qwen/Qwen2.5-7B-Instruct"]' ||
117+
'["Qwen/Qwen3-8B-Base"]' ||
109118
contains(github.event.pull_request.labels.*.name, 'vl-accuracy-test') &&
110-
'["Qwen/Qwen2.5-VL-7B-Instruct"]'
119+
'["Qwen/Qwen2.5-VL-7B-Instruct"]' ||
120+
contains(github.event.pull_request.labels.*.name, 'moe-accuracy-test') &&
121+
'["Qwen/Qwen3-30B-A3B"]'
111122
) }}
112-
# Remove exclude after https://github.com/vllm-project/vllm-ascend/issues/1044 resolved
113-
exclude:
114-
- model_name: Qwen/Qwen2.5-VL-7B-Instruct
115-
vllm_use_version: 1
116123

117124
fail-fast: false
118125
name: ${{ matrix.model_name }} accuracy V${{ matrix.vllm_use_version }}
119126
container:
120127
image: m.daocloud.io/quay.io/ascend/cann:8.1.rc1-910b-ubuntu22.04-py3.10
121128
env:
122-
HF_ENDPOINT: https://hf-mirror.com
123-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
124129
DATASET_SOURCE: ModelScope
125130
VLLM_USE_MODELSCOPE: True
131+
USE_MODELSCOPE_HUB: 1
126132
# 1. If version specified (work_dispatch), do specified branch accuracy test
127133
# 2. If no version (labeled PR), do accuracy test by default ref:
128134
# The branch, tag or SHA to checkout. When checking out the repository that
@@ -158,7 +164,7 @@ jobs:
158164
repository: vllm-project/vllm
159165
path: ./vllm-empty
160166
# Please also update this when bump matched version
161-
ref: ${{ github.event.inputs.vllm-version || 'v0.9.1' }}
167+
ref: ${{ github.event.inputs.vllm-version || 'v0.9.2' }}
162168

163169
- name: Install vllm-project/vllm from source
164170
working-directory: ./vllm-empty
@@ -177,11 +183,28 @@ jobs:
177183
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
178184
run: |
179185
pip install -r requirements-dev.txt
180-
pip install -e .
186+
pip install -v -e .
187+
188+
- name: Get vLLM commit hash and URL
189+
working-directory: ./vllm-empty
190+
run: |
191+
VLLM_COMMIT=$(git rev-parse --short=7 HEAD)
192+
echo "VLLM_COMMIT=$VLLM_COMMIT" >> $GITHUB_ENV
193+
194+
- name: Get vLLM-Ascend commit hash and URL
195+
working-directory: ./vllm-ascend
196+
run: |
197+
VLLM_ASCEND_COMMIT=$(git rev-parse --short=7 HEAD)
198+
echo "VLLM_ASCEND_COMMIT=$VLLM_ASCEND_COMMIT" >> $GITHUB_ENV
199+
200+
- name: Print resolved hashes
201+
run: |
202+
echo "vLLM : ${{ env.VLLM_COMMIT }}"
203+
echo "vLLM-Ascend: ${{ env.VLLM_ASCEND_COMMIT }}"
181204
182205
- name: Install lm-eval, ray, and datasets
183206
run: |
184-
pip install lm-eval
207+
pip install lm-eval==0.4.8
185208
186209
- name: Collect version info
187210
run: |
@@ -233,7 +256,10 @@ jobs:
233256
--cann_version "${{ env.GHA_CANN_VERSION }}" \
234257
--torch_npu_version "${{ env.GHA_TORCH_NPU_VERSION }}" \
235258
--torch_version "${{ env.GHA_TORCH_VERSION }}" \
236-
--vllm_version "${{ env.GHA_VLLM_VERSION }}"
259+
--vllm_version "${{ env.GHA_VLLM_VERSION }}" \
260+
--vllm_commit "${{ env.VLLM_COMMIT }}" \
261+
--vllm_ascend_commit "${{ env.VLLM_ASCEND_COMMIT }}" \
262+
--vllm_use_v1 "$VLLM_USE_V1"
237263
238264
- name: Generate step summary
239265
if: ${{ always() }}
@@ -245,12 +271,122 @@ jobs:
245271
SAFE_VLLM_ASCEND_VERSION="${GHA_VLLM_ASCEND_VERSION//\//-}"
246272
echo "SAFE_VLLM_ASCEND_VERSION=$SAFE_VLLM_ASCEND_VERSION" >> "$GITHUB_ENV"
247273
274+
- name: Check report first line for failure
275+
id: check_report
276+
run: |
277+
REPORT_PATH="./benchmarks/accuracy/${{ steps.report.outputs.markdown_name }}.md"
278+
echo "Scanning $REPORT_PATH for ❌ …"
279+
if grep -q '❌' "$REPORT_PATH"; then
280+
echo "contains_fail=true" >> $GITHUB_OUTPUT
281+
else
282+
echo "contains_fail=false" >> $GITHUB_OUTPUT
283+
fi
284+
248285
- name: Upload Report for V${{ matrix.vllm_use_version }}
249-
if: ${{ github.event_name == 'workflow_dispatch' }}
286+
if: ${{ github.event_name == 'workflow_dispatch' && steps.check_report.outputs.contains_fail == 'false' }}
250287
uses: actions/upload-artifact@v4
251288
with:
252-
name: "${{ env.SAFE_VLLM_ASCEND_VERSION }}-${{ steps.report.outputs.markdown_name }}-report"
289+
name: "report-${{ env.SAFE_VLLM_ASCEND_VERSION }}-${{ steps.report.outputs.markdown_name }}"
253290
path: ./benchmarks/accuracy/${{ steps.report.outputs.markdown_name }}.md
254291
if-no-files-found: warn
255292
retention-days: 90
256293
overwrite: true
294+
295+
create_pr:
296+
runs-on: ubuntu-latest
297+
needs: accuracy_tests
298+
if: ${{ github.event_name == 'workflow_dispatch' }}
299+
env:
300+
UPSTREAM_REPO: vllm-project/vllm-ascend
301+
steps:
302+
- name: Checkout repository
303+
uses: actions/checkout@v4
304+
with:
305+
repository: vllm-ascend-ci/vllm-ascend
306+
token: ${{ secrets.PAT_TOKEN }}
307+
ref: main
308+
309+
- name: Add upstream remote
310+
run: |
311+
git remote add upstream https://github.com/${{ env.UPSTREAM_REPO }}.git
312+
git fetch upstream
313+
git remote -v
314+
315+
- name: Set Git user info dynamically
316+
run: |
317+
git config user.name "${{ github.actor }}"
318+
git config user.email "${{ github.actor }}@users.noreply.github.com"
319+
320+
- name: Create or switch to branch
321+
run: |
322+
TIMESTAMP=$(date +%Y%m%d%H%M%S)
323+
BRANCH_NAME="auto-pr/accuracy-report-${TIMESTAMP}"
324+
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
325+
git checkout -B "${BRANCH_NAME}" upstream/${{ github.event.inputs.vllm-ascend-version }}
326+
327+
- name: Download only current run reports
328+
uses: actions/download-artifact@v4
329+
with:
330+
path: ./docs/source/developer_guide/evaluation/accuracy_report
331+
pattern: report-*
332+
github-token: ${{ secrets.GITHUB_TOKEN }}
333+
run-id: ${{ github.run_id }}
334+
335+
- name: Delete old report
336+
run: |
337+
find ./docs/source/developer_guide/evaluation/accuracy_report -maxdepth 1 -type f -name '*.md' ! -name 'index.md' -delete
338+
find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 2 -type f -name '*.md' -exec mv -f {} ./docs/source/developer_guide/evaluation/accuracy_report \;
339+
find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 1 -type d -empty -delete
340+
341+
- name: Update accuracy_report/index.md
342+
run: |
343+
REPORT_DIR="./docs/source/developer_guide/evaluation/accuracy_report"
344+
INDEX_MD="$REPORT_DIR/index.md"
345+
{
346+
echo "# Accuracy Report"
347+
echo ""
348+
echo ":::{toctree}"
349+
echo ":caption: Accuracy Report"
350+
echo ":maxdepth: 1"
351+
352+
for report in "$REPORT_DIR"/*.md; do
353+
filename="$(basename "$report" .md)"
354+
if [ "$filename" != "index" ]; then
355+
echo "$filename"
356+
fi
357+
done
358+
echo ":::"
359+
} > "$INDEX_MD"
360+
361+
- name: push accuracy report
362+
env:
363+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
364+
run: |
365+
git add ./docs/source/developer_guide/evaluation/accuracy_report/*.md
366+
git commit -s -m "[Doc] Update accuracy reports for ${{ github.event.inputs.vllm-ascend-version }}"
367+
git push -f origin "${{ env.BRANCH_NAME }}"
368+
369+
- name: Create PR in upstream via API
370+
uses: actions/github-script@v7
371+
with:
372+
github-token: ${{ secrets.PAT_TOKEN }}
373+
script: |
374+
const pr = await github.rest.pulls.create({
375+
owner: 'vllm-project',
376+
repo: 'vllm-ascend',
377+
head: `vllm-ascend-ci:${{ env.BRANCH_NAME }}`,
378+
base: '${{ github.event.inputs.vllm-ascend-version }}',
379+
title: `[Doc] Update accuracy reports for ${{ github.event.inputs.vllm-ascend-version }}`,
380+
body: `The accuracy results running on NPU Altlas A2 have changed, updating reports for:
381+
${{
382+
github.event.inputs.models == 'all'
383+
&& 'All models (Qwen/Qwen3-30B-A3B, Qwen2.5-VL-7B-Instruct, Qwen3-8B-Base)'
384+
|| github.event.inputs.models
385+
}}
386+
387+
- [Workflow run][1]
388+
389+
[1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`
390+
});
391+
core.info(`Created PR #${pr.data.number}`);
392+

.github/workflows/doc_codespell.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
name: 'doc-codespell'
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- 'main'
8+
- '*-dev'
9+
paths:
10+
- 'docs/**'
11+
12+
jobs:
13+
codespell:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.10"]
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements-lint.txt
28+
- name: Run codespell check
29+
run: |
30+
CODESPELL_EXCLUDES=('--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,./vllm_ascend.egg-info/**')
31+
CODESPELL_IGNORE_WORDS=('-L' 'CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn,assertIn,rever')
32+
33+
codespell --toml pyproject.toml "${CODESPELL_EXCLUDES[@]}" "${CODESPELL_IGNORE_WORDS[@]}"

.github/workflows/format_pr_body.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# This file is a part of the vllm-ascend project.
16+
#
17+
18+
name: format / pr body
19+
20+
on:
21+
# The PR updated when PR opened and push new commits
22+
pull_request_target:
23+
types: [opened, synchronize]
24+
branches:
25+
- 'main'
26+
27+
permissions:
28+
pull-requests: write
29+
30+
jobs:
31+
update-description:
32+
name: update vLLM version
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Checkout vllm-project/vllm repo
37+
uses: actions/checkout@v4
38+
with:
39+
repository: vllm-project/vllm
40+
path: ./vllm-empty
41+
42+
- name: Get vLLM version
43+
working-directory: ./vllm-empty
44+
run: |
45+
VLLM_COMMIT=$(git rev-parse HEAD)
46+
echo "VLLM_COMMIT=https://github.com/vllm-project/vllm/commit/$VLLM_COMMIT" >> $GITHUB_ENV
47+
48+
- name: Checkout repository
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
53+
54+
- name: Get vLLM release version
55+
run: |
56+
VLLM_VERSION=$(python3 docs/source/conf.py | jq .vllm_version | tr -d '"')
57+
echo "VLLM_VERSION=$VLLM_VERSION" >> $GITHUB_ENV
58+
59+
- name: Update PR description
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
run: |
63+
bash .github/format_pr_body.sh "${{ github.event.number }}" "${{ env.VLLM_VERSION }}" "${{ env.VLLM_COMMIT }}"

0 commit comments

Comments
 (0)