Skip to content

Commit 4f53558

Browse files
committed
Merge branch 'users/stbaione/sglang-benchmark-fix' of https://github.com/nod-ai/shark-ai into fix-sglang-benchmark-missing-models
2 parents 5c48275 + 4a5732d commit 4f53558

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

.github/workflows/ci-sglang-benchmark.yml

+33-7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ name: SGLang Llama Benchmarking Tests
2020

2121
on:
2222
workflow_dispatch:
23+
# TODO: Remove after CI validation
24+
pull_request:
2325
schedule:
2426
# Weekdays at 11:00 AM UTC = 03:00 AM PST / 04:00 AM PDT
2527
- cron: "0 11 * * 1-5"
@@ -80,6 +82,9 @@ jobs:
8082
8183
pip freeze
8284
85+
- name: Login to huggingface
86+
run: huggingface-cli login --token ${{ secrets.HF_TOKEN }}
87+
8388
- name: Run Shortfin Benchmark Tests
8489
run: |
8590
source ${VENV_DIR}/bin/activate
@@ -110,11 +115,25 @@ jobs:
110115
with:
111116
python-version: ${{matrix.version}}
112117

113-
- name: Install SGLang
118+
- name: Install deps
114119
run: |
115120
python -m pip install --no-compile --upgrade pip
121+
116122
pip install "git+https://github.com/nod-ai/sglang.git#subdirectory=python"
117123
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+
118137
- name: Set up Docker Buildx
119138
uses: docker/setup-buildx-action@v3
120139

@@ -158,19 +177,26 @@ jobs:
158177
run: |
159178
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
160179
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:
161193
- name: Stop sglang-server
162194
run: docker stop sglang-server || true # Stop container if it's running
163195

164196
# Deleting image after run due to large disk space requirement (83 GB)
165197
- name: Cleanup SGLang Image
166198
run: docker image rm lmsysorg/sglang:v0.3.5.post1-rocm620
167199

168-
- name: Upload pytest report
169-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
170-
with:
171-
name: sglang_benchmark
172-
path: sglang_index.html
173-
174200
merge_and_upload_reports:
175201
name: "Merge and upload benchmark reports"
176202
needs: [benchmark_shortfin, benchmark_sglang]

0 commit comments

Comments
 (0)