5
5
# Run every 2 hours
6
6
- cron : ' 0 */2 * * *'
7
7
workflow_dispatch :
8
+ inputs :
9
+ vllm_branch :
10
+ required : true
11
+ type : string
12
+ default : main
13
+ vllm_commit :
14
+ required : false
15
+ type : string
8
16
pull_request :
9
17
paths :
10
18
- .github/workflows/vllm-benchmark.yml
27
35
with :
28
36
repository : vllm-project/vllm
29
37
path : vllm-benchmarks/vllm
30
- ref : main
38
+ ref : ${{ inputs.vllm_branch || ' main' }}
31
39
fetch-depth : 0
32
40
33
41
- uses : actions/setup-python@v5
@@ -50,35 +58,38 @@ jobs:
50
58
- name : Check for last benchmark commit
51
59
working-directory : vllm-benchmarks
52
60
env :
53
- HEAD_BRANCH : main
61
+ HEAD_BRANCH : ${{ inputs.vllm_branch || 'main' }}
62
+ HEAD_SHA : ${{ inputs.vllm_commit || '' }}
54
63
DOCKER_IMAGE_PREFIX : public.ecr.aws/q9t5s3a7/vllm-ci-postmerge-repo
55
64
run : |
56
65
set -eux
57
66
58
- pushd vllm
59
- # Looking back the latest 100 commits is enough
60
- for i in {0..99}
61
- do
62
- # Check if the image is there, if it doesn't then check an older one
63
- # because the commit is too recent
64
- HEAD_SHA=$(git rev-parse --verify HEAD~${i})
65
- DOCKER_IMAGE="${DOCKER_IMAGE_PREFIX}:${HEAD_SHA}"
66
-
67
- # No Docker image available yet because the commit is too recent
68
- if ! docker manifest inspect "${DOCKER_IMAGE}"; then
69
- continue
70
- fi
71
-
72
- NOT_EXIST=0
73
- S3_PATH="v3/vllm-project/vllm/${HEAD_BRANCH}/${HEAD_SHA}/${GPU_DEVICE}/benchmark_results.json"
74
- aws s3api head-object --bucket ossci-benchmarks --key ${S3_PATH} || NOT_EXIST=1
75
-
76
- if [[ ${NOT_EXIST} == "1" ]]; then
77
- echo "Found a vLLM commit ${HEAD_SHA} that hasn't been benchmarked yet"
78
- break
79
- fi
80
- done
81
- popd
67
+ if [[ -z "${HEAD_SHA}" ]]; then
68
+ pushd vllm
69
+ # Looking back the latest 100 commits is enough
70
+ for i in {0..99}
71
+ do
72
+ # Check if the image is there, if it doesn't then check an older one
73
+ # because the commit is too recent
74
+ HEAD_SHA=$(git rev-parse --verify HEAD~${i})
75
+ DOCKER_IMAGE="${DOCKER_IMAGE_PREFIX}:${HEAD_SHA}"
76
+
77
+ # No Docker image available yet because the commit is too recent
78
+ if ! docker manifest inspect "${DOCKER_IMAGE}"; then
79
+ continue
80
+ fi
81
+
82
+ NOT_EXIST=0
83
+ S3_PATH="v3/vllm-project/vllm/${HEAD_BRANCH}/${HEAD_SHA}/${GPU_DEVICE}/benchmark_results.json"
84
+ aws s3api head-object --bucket ossci-benchmarks --key ${S3_PATH} || NOT_EXIST=1
85
+
86
+ if [[ ${NOT_EXIST} == "1" ]]; then
87
+ echo "Found a vLLM commit ${HEAD_SHA} that hasn't been benchmarked yet"
88
+ break
89
+ fi
90
+ done
91
+ popd
92
+ fi
82
93
83
94
echo "HEAD_SHA=$HEAD_SHA" >> $GITHUB_ENV
84
95
@@ -133,7 +144,6 @@ jobs:
133
144
working-directory : vllm-benchmarks
134
145
env :
135
146
BENCHMARK_RESULTS : vllm/benchmarks/results
136
- HEAD_BRANCH : main
137
147
run : |
138
148
set -eux
139
149
0 commit comments