Closed py9mrg closed 2 years ago
thanks for the report @py9mrg ! I also think that this isn't necessarily intended 👀
The trouble is that grid_regular(sample_size = sample_prop())
doesn't have an argument x
, only sample_size
. You can more easily get to what you want via
library(dials)
#> Loading required package: scales
grid_regular(
list(sample_size = sample_prop())
)
#> # A tibble: 3 × 1
#> sample_size
#> <dbl>
#> 1 0.1
#> 2 0.55
#> 3 1
Created on 2022-03-08 by the reprex package (v2.0.1)
No worries @hfrick . Do you want me to close the issue as it's not a very big deal and your solution works nicely, thanks?
I'll close it since I'm not sure we want to support a method dispatch for anything in the dots when the first argument is missing. If we do, we can open another issue. Thanks for taking the time to report though!
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Hello,
When doing some manual tuning exploration I am using
grid_regular
to form a tuning grid. But I have noticed this curious issue wheresample_size = sample_prop()
will return an error only in the cases where it is the only tuning parameter. If others are present, it is fine.Created on 2022-03-01 by the reprex package (v2.0.1)
The workaround is not the end of the world, but I think this is probably not intended behaviour.