Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check plausibility of model spec before fitting preprocessor #274

Open
simonpcouch opened this issue Dec 11, 2024 · 1 comment
Open

check plausibility of model spec before fitting preprocessor #274

simonpcouch opened this issue Dec 11, 2024 · 1 comment
Labels
feature a feature request or enhancement

Comments

@simonpcouch
Copy link
Contributor

In fit.workflow(), we can know whether a model fit will fail using parsnip::spec_is_possible(). Calling this before fitting the preprocessor would alleviate the pain of fitting a computationally intensive preprocessor, only for the model fit to then fail.

@simonpcouch simonpcouch added the feature a feature request or enhancement label Dec 11, 2024
@EmilHvitfeldt
Copy link
Member

here we are forced to use a more unsightly object$fit$actions$model$spec because we don't have a way to detect whether there is a model spec.

we tried to use extract_spec_parsnip() but it gave a less informative error than what we had before

https://github.com/tidymodels/workflows/pull/281/files#diff-89ce8a92518a7ad9368bcb1ad800fecaaf951cda5cb47da4ac6394a50599e453R7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants