Skip to content

Commit 481a5b1

Browse files
committed
fix-ci-python-and-download-e2e
1 parent e7f5f1f commit 481a5b1

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ jobs:
176176
python-recommender:
177177
# ml/hardware-recommender/ is a standalone project (its own venv, own
178178
# train/download-dataset scripts) that isn't part of the app's build —
179-
# only its *trained checkpoint* ships with the app
180-
# (app/python/artifacts/hardware_recommender.pt), loaded at runtime by
179+
# only its exported ONNX model ships with the app
180+
# (app/python/artifacts/hardware_recommender.onnx), loaded at runtime by
181181
# app/python/recommender_worker.py. This job is deliberately scoped to
182182
# what release publishing actually depends on: the recommender package's
183183
# own unit tests (data/feature encoding logic, no dataset or GPU needed)
@@ -195,24 +195,30 @@ jobs:
195195
cache: pip
196196
cache-dependency-path: ml/hardware-recommender/requirements.txt
197197

198-
- name: Install dependencies (CPU-only torch, matching the shipped runtime)
198+
- name: Install dependencies (CPU-only torch for ML tests)
199199
working-directory: ml/hardware-recommender
200200
# torch's CPU wheels live on a separate index from the rest of
201-
# PyPI — installed in its own invocation, matching how
202-
# app/src/python-runtime-manager.ts installs it for the packaged
203-
# hardware-recommender venv, and avoiding a multi-gigabyte CUDA
204-
# wheel download on a GPU-less CI runner.
201+
# PyPI. Install it separately to keep the training/test stack CPU-only
202+
# and avoid a multi-gigabyte CUDA wheel download on a GPU-less runner;
203+
# the packaged app uses ONNX Runtime for inference and does not ship
204+
# torch in its managed runtime.
205205
run: |
206206
python -m pip install --upgrade pip
207207
python -m pip install --only-binary=:all: --index-url https://download.pytorch.org/whl/cpu torch==2.13.0
208-
python -m pip install --only-binary=:all: $(grep -v '^torch==' requirements.txt)
208+
# pip parses comments and blank lines correctly. Passing the file
209+
# through shell command substitution turned the first comment into
210+
# a literal `#` requirement and failed the job.
211+
python -m pip install --only-binary=:all: -r requirements.txt
209212
210213
- name: Run hardware-recommender unit tests
211214
working-directory: ml/hardware-recommender
212215
run: python -m pytest tests/ -q
213216

214-
- name: Verify the packaged model artifact exists
215-
run: test -f app/python/artifacts/hardware_recommender.pt
217+
- name: Verify the packaged model artifacts exist
218+
run: |
219+
test -f app/python/artifacts/hardware_recommender.onnx
220+
test -f app/python/artifacts/hardware_recommender.onnx.sha256
221+
test -f app/python/artifacts/hardware_recommender.meta.json
216222
217223
- name: Smoke-test the packaged recommender worker against the shipped artifact
218224
working-directory: app/python

e2e/tests/download-center.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ test("Download Center renders and its concurrency control is interactive", async
1818
await expect(window.getByRole("heading", { name: "Download Center" })).toBeVisible();
1919
// No queued jobs on a fresh profile — confirms the empty state renders
2020
// rather than the page crashing on a jobs.map() over undefined/null.
21-
await expect(window.getByText("No downloads yet")).toBeVisible();
21+
await expect(window.getByText("No downloads in this view")).toBeVisible();
2222

23+
await window.getByRole("button", { name: "Download settings" }).click();
2324
const concurrencyInput = window.getByLabel("Concurrent jobs");
2425
await concurrencyInput.fill("3");
2526
await window.getByRole("button", { name: "Apply" }).click();
26-
await expect(concurrencyInput).toHaveValue("3");
27+
await window.getByRole("button", { name: "Download settings" }).click();
28+
await expect(window.getByLabel("Concurrent jobs")).toHaveValue("3");
29+
await window.getByRole("button", { name: "Cancel" }).click();
2730

2831
await window.getByRole("button", { name: "Back" }).click();
2932
await expect(window.getByPlaceholder("Send a message...")).toBeVisible();

0 commit comments

Comments
 (0)