@@ -19,110 +19,146 @@ name: Accuracy Report
1919on :
2020 workflow_dispatch :
2121 inputs :
22- branch :
23- description : ' choose a dev branch to pr '
22+ vllm-ascend- branch :
23+ description : ' vllm-ascend branch: '
2424 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 (choose "all" for all models):'
2731 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+
2940jobs :
30- download :
41+ download_reports :
3142 runs-on : ubuntu-latest
43+ strategy :
44+ matrix :
45+ model : ${{ fromJSON((github.event.inputs.models == 'all' && '["Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-8B-Base"]') || format('["{0}"]', github.event.inputs.models)) }}
46+ version : [0, 1]
47+ exclude :
48+ - model : ' Qwen/Qwen2.5-VL-7B-Instruct'
49+ version : 1
50+ fail-fast : false
51+
52+ name : Download ${{ matrix.model }} V${{ matrix.version }}
3253 steps :
3354 - name : Checkout repository
3455 uses : actions/checkout@v4
3556 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 }}
57+ ref : ${{ github.event.inputs.vllm-ascend-branch }}
4258
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
59+ - name : Get base model name
60+ id : get_basename
4561 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 }}
62+ model_base_name=$(basename "${{ matrix.model }}")
63+ echo "model_base_name=$model_base_name" >> $GITHUB_OUTPUT
64+ shell : bash
5265
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
66+ - name : Query artifact run id
67+ id : get_run_id
5568 run : |
56- ARTIFACT_JSON=$(gh api "repos/${{ github.repository }}/actions/artifacts")
57- 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"
60- env :
61- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6269
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")
70+ ARTIFACT_PATTERN="${{ github.event.inputs.vllm-ascend-branch }}-${{ steps.get_basename.outputs.model_base_name }}-V${{ matrix.version }}-report"
71+ echo "Querying artifacts with pattern: $ARTIFACT_PATTERN"
72+
73+ ARTIFACT_JSON=$(gh api --paginate / repos/${{ github.repository }}/actions/artifacts || echo "{} ")
6774 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"
75+ jq -r --arg pattern "$ARTIFACT_PATTERN" \
76+ '[.artifacts[] | select(.name | test($pattern))] | sort_by(.created_at) | last | .workflow_run.id // empty')
77+
78+ if [ -z "$RUN_ID" ]; then
79+ echo "::warning::No artifact found matching pattern $ARTIFACT_PATTERN. Skipping download."
80+ echo "runid=" >> $GITHUB_OUTPUT
81+ else
82+ echo "Found matching artifact with run ID: $RUN_ID"
83+ echo "runid=$RUN_ID" >> $GITHUB_OUTPUT
84+ fi
7085 env :
71- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7287
73- - name : Download Qwen/Qwen2.5-VL-7B-Instruct V0 Artifact
88+ - name : Download Artifact
89+ if : ${{ steps.get_run_id.outputs.runid != '' }}
7490 uses : actions/download-artifact@v4
7591 with :
76- name : ${{ github.event.inputs.vllm-ascend-version }}-Qwen2.5-VL-7B-Instruct-V0 -report
92+ name : ${{ github.event.inputs.vllm-ascend-branch }}-${{ steps.get_basename.outputs.model_base_name }}-V${{ matrix.version }} -report
7793 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 }}
94+ github-token : ${{ secrets.GITHUB_TOKEN }}
95+ repository : ${{ github.repository }}
96+ run-id : ${{ steps.get_run_id.outputs.runid }}
97+
98+ - name : Upload reports artifact
99+ if : ${{ steps.get_run_id.outputs.runid != '' }}
100+ uses : actions/upload-artifact@v4
101+ with :
102+ name : report-${{ steps.get_basename.outputs.model_base_name }}-v${{ matrix.version }}
103+ path : ./docs/source/developer_guide/evaluation/accuracy_report/*.md
104+ retention-days : 90
81105
82- - name : Download Qwen/Qwen2.5-7B-Instruct Artifact
83- uses : actions/download-artifact@v4
106+ create_pr :
107+ runs-on : ubuntu-latest
108+ needs : download_reports
109+ steps :
110+ - name : Checkout repository
111+ uses : actions/checkout@v4
84112 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 }}
113+ ref : ${{ github.event.inputs.vllm-ascend-branch }}
90114
91- - name : Download Qwen/Qwen3-8B-Base Artifact
92- uses : actions/download-artifact@v4
115+ - name : Setup workspace
116+ run : mkdir -p ./docs/source/developer_guide/evaluation/accuracy_report
117+
118+ - name : Download all reports
119+ uses : dawidd6/action-download-artifact@v3
93120 with :
94- name : ${{ github.event.inputs.vllm-ascend-version }}-Qwen3-8B-Base-V0-report
121+ github_token : ${{ secrets.GITHUB_TOKEN }}
122+ name : ' report-.*'
123+ name_is_regexp : true
124+ search_artifacts : true
95125 path : ./docs/source/developer_guide/evaluation/accuracy_report
96- 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 }}
126+ if_no_artifact_found : warn
127+
128+ - name : Flatten report directory structure
129+ run : |
130+ rm -rf ./docs/source/developer_guide/evaluation/accuracy_report/*.md
131+ find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 2 -type f -name '*.md' -exec mv -f {} ./docs/source/developer_guide/evaluation/accuracy_report/ \;
132+ find ./docs/source/developer_guide/evaluation/accuracy_report -mindepth 1 -type d -empty -delete
99133
100- - name : Display Files
101- working-directory : ./docs/source/developer_guide/evaluation/accuracy_report
134+ - name : Generate step summary
135+ if : ${{ always() }}
102136 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
137+ for report in ./docs/source/developer_guide/evaluation/accuracy_report/*.md; do
138+ if [ -f "$report" ]; then
139+ echo -e "\n\n---\n" >> $GITHUB_STEP_SUMMARY
140+ echo "## 📄 Report File: $(basename $report)" >> $GITHUB_STEP_SUMMARY
141+ cat "$report" >> $GITHUB_STEP_SUMMARY
142+ fi
143+ done
144+
145+ - name : Create Pull Request
108146 uses : peter-evans/create-pull-request@v7
109147 with :
110148 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 }}"
149+ base : ${{ github.event.inputs.vllm-ascend- branch }}
150+ branch : auto-pr/accuracy-report
151+ commit-message : " Update accuracy reports for ${{ github.event.inputs.vllm-ascend- branch }}"
114152 add-paths : ./docs/source/developer_guide/evaluation/accuracy_report/*.md
115- title : " [Doc]Update accuracy report for ${{ github.event.inputs.branch }}"
153+ title : " [Doc] Update accuracy reports for ${{ github.event.inputs.vllm-ascend- branch }}"
116154 body : |
117- The accuracy results running on Ascend NPU have changed, I'm updating the report.
118- Please review the changes.
119-
155+ The accuracy results running on NPU Altlas A2 have changed, updating reports for:
156+ ${{
157+ github.event.inputs.models == 'all'
158+ && 'All models (Qwen2.5-7B-Instruct, Qwen2.5-VL-7B-Instruct, Qwen3-8B-Base)'
159+ || github.event.inputs.models
160+ }}
161+
120162 - [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 }}
163+
164+ [1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
0 commit comments