@@ -20,6 +20,8 @@ name: SGLang Llama Benchmarking Tests
20
20
21
21
on :
22
22
workflow_dispatch :
23
+ # TODO: Remove after CI validation
24
+ pull_request :
23
25
schedule :
24
26
# Weekdays at 11:00 AM UTC = 03:00 AM PST / 04:00 AM PDT
25
27
- cron : " 0 11 * * 1-5"
80
82
81
83
pip freeze
82
84
85
+ - name : Login to huggingface
86
+ run : huggingface-cli login --token ${{ secrets.HF_TOKEN }}
87
+
83
88
- name : Run Shortfin Benchmark Tests
84
89
run : |
85
90
source ${VENV_DIR}/bin/activate
@@ -110,11 +115,25 @@ jobs:
110
115
with :
111
116
python-version : ${{matrix.version}}
112
117
113
- - name : Install SGLang
118
+ - name : Install deps
114
119
run : |
115
120
python -m pip install --no-compile --upgrade pip
121
+
116
122
pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python"
117
123
124
+ pip install pytest
125
+
126
+ # Use newest possible releases to be able to track commits that may
127
+ # cause errors or performance changes.
128
+ pip install -r requirements-iree-unpinned.txt
129
+
130
+ pip install --no-compile \
131
+ -r sharktank/requirements-tests.txt \
132
+ -r shortfin/requirements-tests.txt \
133
+ -e sharktank/ shortfin/
134
+
135
+ pip freeze
136
+
118
137
- name : Set up Docker Buildx
119
138
uses : docker/setup-buildx-action@v3
120
139
@@ -158,19 +177,26 @@ jobs:
158
177
run : |
159
178
pytest -v app_tests/benchmark_tests/llm/sglang_benchmarks/sglang_benchmark_test.py --port 30000 --log-cli-level=INFO --html=sglang_index.html --self-contained-html
160
179
180
+ - name : Upload pytest report
181
+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
182
+ with :
183
+ name : sglang_benchmark
184
+ path : sglang_index.html
185
+
186
+ # Ensure that the container is always cleaned up after job
187
+ container_cleanup :
188
+ needs : benchmark_sglang
189
+ name : " Docker Cleanup"
190
+ if : always()
191
+ runs-on : mi300x-3
192
+ steps :
161
193
- name : Stop sglang-server
162
194
run : docker stop sglang-server || true # Stop container if it's running
163
195
164
196
# Deleting image after run due to large disk space requirement (83 GB)
165
197
- name : Cleanup SGLang Image
166
198
run : docker image rm lmsysorg/sglang:v0.3.5.post1-rocm620
167
199
168
- - name : Upload pytest report
169
- uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
170
- with :
171
- name : sglang_benchmark
172
- path : sglang_index.html
173
-
174
200
merge_and_upload_reports :
175
201
name : " Merge and upload benchmark reports"
176
202
needs : [benchmark_shortfin, benchmark_sglang]
0 commit comments