Repository navigation
Commit f56db25
fix(tests): release/ignore Windows ONNX temp-file lock in llada & unet parity tests (#417)
## Summary
- use `TemporaryDirectory(ignore_cleanup_errors=True)` for every
temporary ONNX model in the LLaDA and UNet parity tests
- document that ONNX Runtime keeps model files memory-mapped on Windows
- preserve all inference and parity assertions unchanged
## Root cause
ONNX Runtime can retain a memory-mapped handle to the `.onnx` model on
Windows. Temporary-directory teardown then raises `PermissionError`
because Windows does not allow deleting an open file, unlike POSIX.
## Verification
- `python3 -m pytest src/mobius/models/unet_parity_test.py
src/mobius/models/llada_test.py -q` — 3 passed, 4 skipped
- `ruff format --check src/mobius/models/llada_test.py
src/mobius/models/unet_parity_test.py`
- `ruff check src/mobius/models/llada_test.py
src/mobius/models/unet_parity_test.py`
`lintrunner` was also attempted with only these paths; the installed
adapter invokes an older Ruff that cannot parse the repository
configuration rule `RUF067`.
Co-authored-by: Copilot <[email protected]>1 parent cce80a4 commit f56db25
2 files changed
Lines changed: 27 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
191 | 198 | | |
192 | 199 | | |
193 | 200 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
274 | | - | |
275 | | - | |
276 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| |||
0 commit comments