tidymodels / hardhat

Construct Modeling Packages
https://hardhat.tidymodels.org
Other
101 stars 16 forks source link

Remove `bake_dependent_roles` in favor of new recipes role requirements #207

Closed DavisVaughan closed 2 years ago

DavisVaughan commented 2 years ago

Joint PR with https://github.com/tidymodels/recipes/pull/1011

We've reverted the change made in hardhat 1.0.0 that implied that non-standard role columns weren't required at forge() / bake() time. We have actually decided to take the opposite stance in recipes - i.e. we now require that all predictors and non-standard roles are present at bake() time, unless explicitly stated otherwise through update_role_requirements().

We now default to the following bake time role requirements, which matches the defaults of recipes:

default_bake_role_requirements()
#>      outcome    predictor case_weights           NA 
#>        FALSE         TRUE        FALSE         TRUE

This is essentially what pre 1.0.0 hardhat was doing (requiring all predictors, unspecified columns, and non-standard roles), with a new exception for case weights.

Additionally, we respect any changes made to these defaults through update_role_requirements().

There is full backwards compatibility with pre 1.0.0 recipes, so that hardhat can go to CRAN with these changes before recipes.

github-actions[bot] commented 2 years ago

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.