-
Notifications
You must be signed in to change notification settings - Fork 42
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
tune_grid()
fails if parameter is not marked as tunable()
despite matching grid
#660
Comments
The example is motivated by tidymodels/dials#154 |
Wasn't sure whether to apply |
A bit more context from poking at this for a moment...
So, step 1 is to disambiguate |
Just to give another example with
There are 2^119 combinations of holidays (so make it tunable could be dangerous), but it would be nice if we could tune it based on a set of defined values, like this (as it's okay with list-columns now #633):
Thanks! |
In #633, we enabled tune to deal with list-columns in the grid, in order to allow people to use a custom grid to tune lower-level arguments.
The example there was based on wanting to tune parameters to a custom loss function that was passed to the
objective
engine argument for xgboost. When applying the same approach to a recipe step, it fails:Created on 2023-04-04 with reprex v2.0.2
More details on why this fails are below but the higher-level question is: If you tag something for tuning and bring your own grid for it, shouldn't it work?
Currently, this traces back to
tune_args()
for recipes limiting the scope of checking fortune()
tags to arguments which were designated for tuning viatunable()
.https://github.com/tidymodels/recipes/blob/567fe17cddb2cb880bcd30daa7737effca065ed9/R/tune_args.R#L29-L32
We can bypass some previous checks by giving
tune_grid()
a decoy parameter set but becausetune_args()
, called here:tune/R/checks.R
Line 75 in 802909c
for this recipe is empty, this is where the journey currently ends.
Is this a matter of reworking the checks or the error messages? Or a bigger question of where do we accept
tune()
tags and how to deal with them?The text was updated successfully, but these errors were encountered: