-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
We generally like the "empty input, empty output" pattern.
I suspect this inconsistency comes from how we use them in downstream tidymodels packages, so if we switch to the "empty input, empty output" pattern, we need to check that nothing falls over downstream.
Here are two examples; there might be more/the other grid functions should work the same way as grid_regular().
library(dials)
#> Loading required package: scales
# not allowed
parameters()
#> Error:
#> ! ! Could not evaluate cli `{}` expression: `x`.
#> Caused by error in `eval(expr, envir = envir)`:
#> ! argument "x" is missing, with no default
# allowed
parameters(list())
#> Collection of 0 parameters for tuning
#>
#> [1] identifier type object
#> <0 rows> (or 0-length row.names)
#>
# not allowed
grid_regular()
#> Error in `UseMethod()`:
#> ! no applicable method for 'grid_regular' applied to an object of class "NULL"
# also not allowed
grid_regular(list())
#> Error in `grid_regular()`:
#> ! At least one parameter object is required.Created on 2026-02-23 with reprex v2.1.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement