Commit b0f5456
committed
fix(ci): patch gpu_backend by dotted path in the live-detection routing test
`HardwareProfile.detect()` dereferences `routing._gb.has_cuda_rust()`, where
`_gb` is the `qector_decoder_v3.gpu_backend` entry in sys.modules. The test
patched the package-level attribute `qd.gpu_backend` instead. Locally the two
are the same object so it worked; in CI the patch did not take and `detect()`
kept reading the real hardware, so the two cases expecting gpu=True/cuda=True
failed on the GPU-less runner while passing on any developer machine with a GPU.
monkeypatch's dotted-path form resolves the module through sys.modules, which is
exactly what the code under test dereferences.1 parent 0ffff05 commit b0f5456
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
0 commit comments