-
Notifications
You must be signed in to change notification settings - Fork 92
set_model_arg() errors uninformatively when func isn't a list #1251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Might have also been related to #1252 |
Hello @chillerb 👋 We would sadly need a more complete reprex to be able to help you |
Hi @EmilHvitfeldt, |
Hi again @EmilHvitfeldt , You see, I registered a model argument like this: set_model_arg(
model = "my_reg",
eng = "my_engine",
parsnip = "mixture",
original = "alpha",
func = c(pkg = "dials", fun = "mixture"),
has_submodel = FALSE
) When I should have registered it like this: set_model_arg(
model = "my_reg",
eng = "my_engine",
parsnip = "mixture",
original = "alpha",
func = list(pkg = "dials", fun = "mixture"),
has_submodel = FALSE
) It took me forever to notice the difference: The error occurs when However, I still think this should be addressed by additional type checks and a clearer error message or automatic type conversions. Especially, since the documentation for
|
Thank you! Good find! That should be an easy fix on our side |
The problem
I have a weird problem, where I registered a new parsnip model, but on calling
tune_grid
it results in an error message.The issue might be my own fault, but the error message appears a little bit cryptic to me and I can't pinpoint the actual problem.
The error didn't appear for the MDA discrim_mixture tutorial though.
Reproducible example
Sorry, maybe I will add a fully reproducible example later.
The text was updated successfully, but these errors were encountered: