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

No longer "reset" the workflow after preprocessing and model fitting #295

merged 2 commits into from
Oct 7, 2020


Copy link

Another step towards #294

Previously we would reset the workflow after we finalized it for preprocessing / model fitting because we needed downstream calls to parameters() to work (i.e. the parameters needed to not be finalized so we could detect which ones were tunable). I've refactored to avoid the need for this, which has two big benefits:

  • Further unification between all of the code paths. Now we don't need train_recipe_grid() or train_model() anymore, we just call .fit_pre() and .fit_model() directly every time.

  • The finalized workflow is now available for extraction by the extract function. Previously you could only extract a version of the workflow that didn't have finalized tunable parameters.

These changes will make it trivial for the code paths to call workflows::.fit_finalize(), which should fix the issues in #294 automatically.

The key here is to avoid calling `parameters()` on a finalized workflow, as it won't have any tunable elements after finalization
@DavisVaughan DavisVaughan merged commit 62c4aba into tidymodels:master Oct 7, 2020
@DavisVaughan DavisVaughan deleted the fix/workflow-params branch October 7, 2020 17:48
Copy link

github-actions bot commented Mar 6, 2021

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant