Open
Description
The problem
When registering a custom model which also returns a modified glmnet class object, it took me a while to notice that parsnip also exports the S3 Method predict._elnet
. Since _elnet
is the first listed class object in the list of class attributes, the method predict._elnet
exported by parsnip seems to take priority over parsnip's own predict.model_fit
, therefore never actually calling my registered predict module, but parsnips glmnet
routine. I know that this must be some super rare edge case, but it just took me an hour to figure this out and it seems like a developer pitfall to be aware of.
class(my_model)
[1] "_elnet" "model_fit"
Metadata
Metadata
Assignees
Labels
No labels