Commit eb49a56
committed
fix: use PY311 models for Python 3.12+ to fix monotonic_cst AttributeError
predictor.py hardcoded version checks for [9, 10, 11], causing Python 3.12
and 3.13 to fall through to the root-level pkl files which were serialized
with an old sklearn (<1.4) that lacks the monotonic_cst attribute.
Fix: clamp to the newest versioned directory (PY311) for any unknown minor
version. sklearn is pinned at >=1.6.1,<2.0 for all Python versions, so the
PY311 models (re-serialized in the uv migration, #113) are pickle-compatible
with Python 3.12 and 3.13.
Fixes: AttributeError: 'DecisionTreeClassifier' object has no attribute 'monotonic_cst'1 parent 6ccd644 commit eb49a56
1 file changed
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
287 | 282 | | |
288 | 283 | | |
289 | 284 | | |
| |||
0 commit comments