Commit ce7e2b7
committed
fix(inference): fall back to demo weights when ONNX file is unreadable
An LFS pointer file (or any corrupt .onnx) crashed InferenceSession with
InvalidProtobuf — failing CI and any prod flood prediction after a
checkout without LFS objects. Treat unloadable ONNX like a missing model
and fall back to untrained/demo weights, matching existing behavior.1 parent b43a712 commit ce7e2b7
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
202 | 215 | | |
203 | 216 | | |
204 | 217 | | |
| |||
0 commit comments