← Back to all sparks
W

workflows

ANALYTICS
Velocity0.0

Bundle preprocessing, modeling and post-processing steps into a single R object

The tidymodels pipeline grew a third stage, and it happens after the model runs.

tidymodelspipelinespostprocessingsparse-datatuningapi-design
Current state
workflows bundles a preprocessor and a model into one object that tidymodels can fit, tune and extract from. Version 1.3.0 added a post stage backed by the tailor package, wired through every generic a workflow supports — augment, tidy, tunable, tune_args, required_pkgs and parameter extraction. Version 1.2.0 added sparse data support so fit() and predict() accept dgCMatrix and sparse tibbles. Earlier releases in view are boundary tightening: erroring on unknown model modes, on trained recipes, and on silently ignored formula offsets.
Where it's heading
The object is filling out into a complete pipeline description rather than a preprocessing-plus-model pair. Postprocessing is the structural addition — calibration and threshold selection were previously done by hand after prediction, outside anything tidymodels could tune or record — and the fact that it arrived integrated with tunable() and tune_args() rather than as a standalone step is the point. The rest of the arc is the steady tidymodels habit of converting silent guesses into errors.
Prediction
Expect tailor postprocessors to spread through tune and workflowsets next, since the parameter and tuning generics were wired up first, and expect sparse support to extend to more engines after lightgbm.

Recent moves

  1. 11mo ago

    Workflows gain a postprocessing stage via tailor

    ⚡ SPARK

    Adds a post stage to the workflow object, integrating tailor postprocessors and threading them through every workflow generic. This changes what a workflow is — a full model pipeline including what happens after prediction, not just what happens before.

    View source ↗
  2. 1y ago

    Sparse matrices work through fit() and predict()

    Enables fitting and prediction on sparse data — dgCMatrix and sparse tibbles now work through add_recipe() and add_variables(), and as new_data for predict(). Adds extract_fit_time() and moves messaging to cli. Sparse input matters most for text and high-cardinality categorical work, where a dense copy is the memory ceiling.

    View source ↗
  3. 2y ago

    augment() aligns with parsnip; censored regression supported

    Makes augment.workflow() return residuals under the same conditions as the parsnip method, adds an eval_time argument for censored regression, and moves prediction columns to the left of new_data to match parsnip. Also escalates the long-deprecated pull_*() functions to warn on every use.

    View source ↗
  4. 3y ago

    Register tuning generics unconditionally

    Registers the tune_args() and tunable() methods unconditionally. A method-dispatch detail with no behavioural change for users.

    View source ↗
  5. 3y ago

    Missing parsnip extensions now error early; unsupervised specs supported

    Makes add_model() error when a model specification needs a parsnip extension package that is not loaded, and adds support for unsupervised model specifications via modelenv. The extension check turns a confusing downstream failure into an immediate one.

    View source ↗
  6. 3y ago

    Mode guessing removed; silent offset handling now errors

    A maintainer handover release that also stops add_model() guessing a model's mode, a breaking change bringing workflows in line with parsnip::fit(). add_formula() now errors on offsets it used to silently ignore, and butcher can strip the recipe preprocessor's stored template.

    View source ↗