You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT] Make read_json refuse a __class__ that is not a chainladder estimator #1628
Follow-up to #1569, split out of #1606 as separate scope. read_json looks up __class__ in the chainladder namespace, so it accepts any object there: {"__class__": "load_sample", "params": {}} calls load_sample() and raises a TypeError about the missing argument. Nested estimators, such as BerquistSherman's reported_count_estimator, are loaded the same way.
Proposal: raise a ValueError naming the __class__ when it is not a chainladder estimator class, at the top level, for each pipeline step and for nested estimators, and run the parameter check from #1606 on the nested estimators as well.
(This issue was written with Árbol, an AI assistant, under my direction.)
Activity