No longer "reset" the workflow after preprocessing and model fitting #295
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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()
ortrain_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.