@@ -19,110 +19,184 @@ name: Accuracy Report
19
19
on :
20
20
workflow_dispatch :
21
21
inputs :
22
- branch :
23
- description : ' choose a dev branch to pr '
22
+ vllm-ascend- branch :
23
+ description : ' vllm-ascend branch: '
24
24
required : true
25
- vllm-ascend-version :
26
- description : ' what vllm-ascend version to accuracy test?'
25
+ type : choice
26
+ options :
27
+ - main
28
+ - v0.7.3-dev
29
+ models :
30
+ description : ' models:'
27
31
required : true
28
- type : string
32
+ type : choice
33
+ options :
34
+ - all
35
+ - Qwen/Qwen2.5-7B-Instruct
36
+ - Qwen/Qwen2.5-VL-7B-Instruct
37
+ - Qwen/Qwen3-8B-Base
38
+ default : ' all'
39
+
29
40
jobs :
30
- download :
41
+ download_reports :
31
42
runs-on : ubuntu-latest
43
+ strategy :
44
+ matrix :
45
+ model : ${{ fromJSON(
46
+ (github.event.inputs.models == 'all' &&
47
+ ' ["Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-8B-Base"]' ) ||
48
+ (github.event.inputs.models == 'Qwen/Qwen2.5-7B-Instruct' &&
49
+ ' ["Qwen/Qwen2.5-7B-Instruct"]' ) ||
50
+ (github.event.inputs.models == 'Qwen/Qwen2.5-VL-7B-Instruct' &&
51
+ ' ["Qwen/Qwen2.5-VL-7B-Instruct"]' ) ||
52
+ (github.event.inputs.models == 'Qwen/Qwen3-8B-Base' &&
53
+ ' ["Qwen/Qwen3-8B-Base"]' )
54
+ ) }}
55
+
56
+ version : [0, 1]
57
+ exclude :
58
+ - model : ' Qwen/Qwen2.5-VL-7B-Instruct'
59
+ version : 1
60
+ fail-fast : false
61
+
62
+ name : Download ${{ matrix.model }} V${{ matrix.version }}
32
63
steps :
33
64
- name : Checkout repository
34
65
uses : actions/checkout@v4
35
66
with :
36
- ref : ${{ github.event.inputs.branch }}
37
-
38
- - name : Debug List Artifacts
39
- run : gh api /repos/${{ github.repository }}/actions/artifacts
40
- env :
41
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67
+ ref : ${{ github.event.inputs.vllm-ascend-branch }}
42
68
43
- - name : Query artifact run id for Qwen2.5-VL-7B-Instruct V0 latest artifact
44
- id : get_Qwen2_5_VL_7B_Instruct_latest_run_id_V0
69
+ - name : Get base model name
70
+ id : get_basename
45
71
run : |
46
- ARTIFACT_JSON=$(gh api "repos/${{ github.repository }}/actions/artifacts")
47
- RUN_ID=$(echo "$ARTIFACT_JSON" | \
48
- jq -r '[.artifacts[] | select(.name=="${{ github.event.inputs.vllm-ascend-version }}-Qwen2.5-VL-7B-Instruct-V0-report")] | sort_by(.created_at) | last | .workflow_run.id')
49
- echo "runid=$RUN_ID" >> "$GITHUB_OUTPUT"
50
- env :
51
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
+ model_base_name=$(basename "${{ matrix.model }}")
73
+ echo "model_base_name=$model_base_name" >> $GITHUB_OUTPUT
74
+ shell : bash
52
75
53
- - name : Query artifact run id for Qwen2.5-7B-Instruct V0 latest artifact
54
- id : get_Qwen2_5_7B_Instruct_latest_run_id_V0
76
+ - name : Query artifact run id
77
+ id : get_run_id
55
78
run : |
56
- ARTIFACT_JSON=$(gh api "repos/${{ github.repository }}/actions/artifacts")
79
+ ARTIFACT_PATTERN="${{ github.event.inputs.vllm-ascend-branch }}-${{ steps.get_basename.outputs.model_base_name }}-V${{ matrix.version }}-report"
80
+ echo "Querying artifacts with pattern: $ARTIFACT_PATTERN"
81
+
82
+ ARTIFACT_JSON=$(gh api --paginate /repos/${{ github.repository }}/actions/artifacts || echo "{}")
83
+
57
84
RUN_ID=$(echo "$ARTIFACT_JSON" | \
58
- jq -r '[.artifacts[] | select(.name=="${{ github.event.inputs.vllm-ascend-version }}-Qwen2.5-7B-Instruct-V0-report")] | sort_by(.created_at) | last | .workflow_run.id')
59
- echo "runid=$RUN_ID" >> "$GITHUB_OUTPUT"
85
+ jq -s -r --arg pattern "$ARTIFACT_PATTERN" \
86
+ '[.[].artifacts[]] | map(select(.name | test($pattern))) | sort_by(.created_at) | last | .workflow_run.id // empty')
87
+
88
+ if [ -z "$RUN_ID" ]; then
89
+ echo "::warning::No artifact found matching pattern $ARTIFACT_PATTERN. Skipping download."
90
+ echo "runid=" >> $GITHUB_OUTPUT
91
+ else
92
+ echo "Found matching artifact with run ID: $RUN_ID"
93
+ echo "runid=$RUN_ID" >> $GITHUB_OUTPUT
94
+ fi
60
95
env :
61
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
96
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
97
63
- - name : Query artifact run id for Qwen3-8B-Base V0 latest artifact
64
- id : get_Qwen3_8B_Base_latest_run_id_V0
65
- run : |
66
- ARTIFACT_JSON=$(gh api "repos/${{ github.repository }}/actions/artifacts")
67
- RUN_ID=$(echo "$ARTIFACT_JSON" | \
68
- jq -r '[.artifacts[] | select(.name=="${{ github.event.inputs.vllm-ascend-version }}-Qwen3-8B-Base-V0-report")] | sort_by(.created_at) | last | .workflow_run.id')
69
- echo "runid=$RUN_ID" >> "$GITHUB_OUTPUT"
70
- env :
71
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
-
73
- - name : Download Qwen/Qwen2.5-VL-7B-Instruct V0 Artifact
98
+ - name : Download Artifact
99
+ if : ${{ steps.get_run_id.outputs.runid != '' }}
74
100
uses : actions/download-artifact@v4
75
101
with :
76
- name : ${{ github.event.inputs.vllm-ascend-version }}-Qwen2.5-VL-7B-Instruct-V0-report
77
- path : ./docs/source/developer_guide/evaluation/accuracy_report
78
- github-token : ${{ secrets.GITHUB_TOKEN }}
79
- repository : vllm-project/vllm-ascend
80
- run-id : ${{ steps.get_Qwen2_5_VL_7B_Instruct_latest_run_id_V0.outputs.runid }}
102
+ name : ${{ github.event.inputs.vllm-ascend-branch }}-${{ steps.get_basename.outputs.model_base_name }}-V${{ matrix.version }}-report
103
+ path : ./docs/source/developer_guide/evaluation/accuracy_report_bak
104
+ github-token : ${{ secrets.GITHUB_TOKEN }}
105
+ repository : ${{ github.repository }}
106
+ run-id : ${{ steps.get_run_id.outputs.runid }}
107
+
108
+ - name : Upload reports artifact
109
+ if : ${{ steps.get_run_id.outputs.runid != '' }}
110
+ uses : actions/upload-artifact@v4
111
+ with :
112
+ name : report-${{ steps.get_basename.outputs.model_base_name }}-v${{ matrix.version }}
113
+ path : ./docs/source/developer_guide/evaluation/accuracy_report_bak/*.md
114
+ retention-days : 90
81
115
82
- - name : Download Qwen/Qwen2.5-7B-Instruct Artifact
83
- uses : actions/download-artifact@v4
116
+ create_pr :
117
+ runs-on : ubuntu-latest
118
+ needs : download_reports
119
+ steps :
120
+ - name : Checkout repository
121
+ uses : actions/checkout@v4
84
122
with :
85
- name : ${{ github.event.inputs.vllm-ascend-version }}-Qwen2.5-7B-Instruct-V0-report
86
- path : ./docs/source/developer_guide/evaluation/accuracy_report
87
- github-token : ${{ secrets.GITHUB_TOKEN }}
88
- repository : vllm-project/vllm-ascend
89
- run-id : ${{ steps.get_Qwen2_5_7B_Instruct_latest_run_id_V0.outputs.runid }}
123
+ ref : ${{ github.event.inputs.vllm-ascend-branch }}
124
+
125
+ - name : Setup workspace
126
+ run : mkdir -p ./accuracy/accuracy_report
90
127
91
- - name : Download Qwen/Qwen3-8B-Base Artifact
128
+ - name : Download only current run reports
92
129
uses : actions/download-artifact@v4
93
130
with :
94
- name : ${{ github.event.inputs.vllm-ascend-version }}-Qwen3-8B-Base-V0-report
95
131
path : ./docs/source/developer_guide/evaluation/accuracy_report
132
+ pattern : report-*
96
133
github-token : ${{ secrets.GITHUB_TOKEN }}
97
- repository : vllm-project/vllm-ascend
98
- run-id : ${{ steps.get_Qwen3_8B_Base_latest_run_id_V0.outputs.runid }}
134
+ run-id : ${{ github.run_id }}
135
+
136
+ - name : Delete old report
137
+ run : |
138
+ find ./docs/source/developer_guide/evaluation/accuracy_report -maxdepth 1 -type f -name '*.md' ! -name 'index.md' -delete
139
+ find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 2 -type f -name '*.md' -exec mv -f {} ./docs/source/developer_guide/evaluation/accuracy_report \;
140
+ find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 1 -type d -empty -delete
99
141
100
- - name : Display Files
101
- working-directory : ./docs/source/developer_guide/evaluation/accuracy_report
142
+ - name : Generate step summary
143
+ if : ${{ always() }}
102
144
run : |
103
- cat ./Qwen2.5-VL-7B-Instruct.md
104
- cat ./Qwen2.5-7B-Instruct.md
105
- cat ./Qwen3-8B-Base.md
106
-
107
- - name : Create Pull Request for markdown update
145
+ for report in ./docs/source/developer_guide/evaluation/accuracy_report/*.md; do
146
+ filename=$(basename "$report")
147
+ # skip index.md
148
+ if [ "$filename" = "index.md" ]; then
149
+ continue
150
+ fi
151
+
152
+ if [ -f "$report" ]; then
153
+ {
154
+ echo -e "\n\n---\n"
155
+ echo "## 📄 Report File: $(basename $report)"
156
+ cat "$report"
157
+ } >> "$GITHUB_STEP_SUMMARY"
158
+ fi
159
+ done
160
+
161
+ - name : Update accuracy_report/index.md
162
+ run : |
163
+ REPORT_DIR="./docs/source/developer_guide/evaluation/accuracy_report"
164
+ INDEX_MD="$REPORT_DIR/index.md"
165
+
166
+ {
167
+ echo "# Accuracy Report"
168
+ echo ""
169
+ echo "::: {toctree}"
170
+ echo ":caption: Accuracy Report"
171
+ echo ":maxdepth: 1"
172
+
173
+ for report in "$REPORT_DIR"/*.md; do
174
+ filename="$(basename "$report" .md)"
175
+ if [ "$filename" != "index" ]; then
176
+ echo "$filename"
177
+ fi
178
+ done
179
+
180
+ echo ":::"
181
+ } > "$INDEX_MD"
182
+
183
+ - name : Create Pull Request
108
184
uses : peter-evans/create-pull-request@v7
109
185
with :
110
186
token : ${{ secrets.PR_TOKEN }}
111
- base : ${{ github.event.inputs.branch }}
112
- branch : auto-pr/accuracy-test
113
- commit-message : " Update accuracy report for ${{ github.event.inputs.branch }}"
187
+ base : ${{ github.event.inputs.vllm-ascend- branch }}
188
+ branch : auto-pr/accuracy-report
189
+ commit-message : " Update accuracy reports for ${{ github.event.inputs.vllm-ascend- branch }}"
114
190
add-paths : ./docs/source/developer_guide/evaluation/accuracy_report/*.md
115
- title : " [Doc]Update accuracy report for ${{ github.event.inputs.branch }}"
191
+ title : " [Doc] Update accuracy reports for ${{ github.event.inputs.vllm-ascend- branch }}"
116
192
body : |
117
- The accuracy results running on Ascend NPU have changed, I'm updating the report.
118
- Please review the changes.
119
-
193
+ The accuracy results running on NPU Altlas A2 have changed, updating reports for:
194
+ ${{
195
+ github.event.inputs.models == 'all'
196
+ && 'All models (Qwen2.5-7B-Instruct, Qwen2.5-VL-7B-Instruct, Qwen3-8B-Base)'
197
+ || github.event.inputs.models
198
+ }}
199
+
120
200
- [Workflow run][1]
121
- - [Qwen2.5-7B-Instruct accuracy report][2]
122
- - [Qwen2.5-VL-7B-Instruct accuracy report][3]
123
- - [Qwen3-8B-Base accuracy report][4]
124
-
125
- [1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
126
- [2]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ steps.get_Qwen2_5_7B_Instruct_latest_run_id_V0.outputs.runid }}
127
- [3]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ steps.get_Qwen2_5_VL_7B_Instruct_latest_run_id_V0.outputs.runid }}
128
- [4]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ steps.get_Qwen3_8B_Base_latest_run_id_V0.outputs.runid }}
201
+
202
+ [1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
0 commit comments