@@ -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
0 commit comments