Addresses tibble Unknown or uninitialized column message
Points out which parameters need params—visually (in the tibble output) + in the revised prompt
Workshops the missing params prompt for pluralization
Refers to where to find help (see reprex—users can see this message without having loaded the package + may be unfamiliar with what a params object is)
Adds snapshot tests
Examples of old output:
# install.packages("dials")
library(parsnip)
boost_tree() %>%
set_engine("C5.0", trials = tune()) %>%
extract_parameter_set_dials()
#> Collection of 1 parameters for tuning
#>
#> identifier type object
#> trials trials lgl
#> Warning: Unknown or uninitialised column: `identifier`.
#> One needs a `param` object: ''
boost_tree() %>%
set_engine("C5.0", trials = tune(), rules = tune()) %>%
extract_parameter_set_dials()
#> Collection of 2 parameters for tuning
#>
#> identifier type object
#> trials trials lgl
#> rules rules lgl
#> Warning: Unknown or uninitialised column: `identifier`.
#> Several need `param` objects: ''
boost_tree() %>%
set_engine("C5.0", trials = tune(), rules = tune(), costs = tune()) %>%
extract_parameter_set_dials()
#> Collection of 3 parameters for tuning
#>
#> identifier type object
#> trials trials lgl
#> rules rules lgl
#> costs costs lgl
#> Warning: Unknown or uninitialised column: `identifier`.
#> Several need `param` objects: ''
Examples of new output:
# devtools::install_github("tidymodels/dials@prompting-230")
library(parsnip)
boost_tree() %>%
set_engine("C5.0", trials = tune()) %>%
extract_parameter_set_dials()
#> Collection of 1 parameters for tuning
#>
#> identifier type object
#> trials trials missing
#> The parameter `trials` needs a `param` object.
#> See `vignette('dials')` to learn more.
boost_tree() %>%
set_engine("C5.0", trials = tune(), rules = tune()) %>%
extract_parameter_set_dials()
#> Collection of 2 parameters for tuning
#>
#> identifier type object
#> trials trials missing
#> rules rules missing
#> The parameters `trials` and `rules` need `param` objects.
#> See `vignette('dials')` to learn more.
boost_tree() %>%
set_engine("C5.0", trials = tune(), rules = tune(), costs = tune()) %>%
extract_parameter_set_dials()
#> Collection of 3 parameters for tuning
#>
#> identifier type object
#> trials trials missing
#> rules rules missing
#> costs costs missing
#> The parameters `trials`, `rules`, and `costs` need `param` objects.
#> See `vignette('dials')` to learn more.
Will self-review to point out a couple of things I’d appreciate an eye for.
This pull request 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.
Closes #230. 🦆
Unknown or uninitialized column
messageparam
s—visually (in thetibble
output) + in the revised promptparams
prompt for pluralizationparams
object is)Examples of old output:
Examples of new output:
Will self-review to point out a couple of things I’d appreciate an eye for.
Created on 2022-04-24 by the reprex package (v2.0.1)