tidymodels / hardhat

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

Implement `bake_dependent_roles` in recipes blueprints #166

Closed DavisVaughan closed 2 years ago

DavisVaughan commented 3 years ago

~For ignoring recipes "roles" that are required at prep() time, but not required at bake() time. An example might be a "case_weights" role that is required for case-weighted estimation at prep-time (like for estimating a mean), but won't be required at bake time (since the estimated mean will be stored)~

DavisVaughan commented 3 years ago

An alternative implementation might make non-standard recipes roles optional in forge() (and thereby, bake()) by default (this is technically a breaking change, but a small one). The argument would be a cleaner name for bake_required_roles.

Assuming that most recipes would have case weight columns that aren't required at bake time, then users wouldn't have to specify add_recipe(blueprint = default_recipe_blueprint(prep_specific_roles = "case_weights")) so often. But that assumption is still to be verified.

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.