Commit 39c01f5
authored
fix(predict): rename Tox21 models dict — it clobbered the structural-alert SMARTS (#61)
I introduced a name collision in #60: the new Tox21 models dict was named `_TOX`,
the same name as the existing structural-alert SMARTS dict. So `_tox_alerts()`
iterated RandomForest objects instead of SMARTS patterns — silently emptying the
structural-alert safety screen when no tox models were present (the CI case, which
is why CI missed it) and crashing predict() when they were (surfaced once the
demo box had trained tox_models/).
Fix: the tox models dict is now `_TOX_MODELS`; the structural-alert `_TOX` is intact.
Adds a regression test (nitrobenzene must trip the 'aromatic nitro' alert). Verified
end-to-end with the populated GRAS + properties tables: menthol BP 215 °C + in-GRAS,
nitrobenzene not-in-GRAS + nitro alert, tox heads loaded. 21 tests pass.
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>1 parent 556ba4a commit 39c01f5
2 files changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
| 626 | + | |
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| |||
0 commit comments