← Back to all sparks
B

bundle

ANALYTICS
Velocity0.0

Prepare objects for serialization with a consistent interface

Four releases in three years, each one teaching the serializer about a model type it couldn't carry

serializationtidymodelsmodel-deploymentcompatibilityr-packages
Current state
bundle solves a narrow, real problem: many R model objects hold pointers to external state — compiled boosters, Java handles, torch tensors — that do not survive being saved and reloaded in another session. It wraps them so they do. The package has shipped four releases since 2022, and the shape of each is the same: extend coverage to another model class, or repair coverage that an upstream release broke.
Where it's heading
Coverage is the product, so the release cadence is set by the ecosystem rather than by a roadmap. dbarts arrived in 0.1.2, along with extra work to preserve xgboost's nfeatures and feature_names through a round trip; 0.1.3 exists because xgboost changed its model format again. The 0.1.1 fix — recipes steps nested inside workflows — points at the same underlying issue one level up, where the object needing bundling is buried inside a tidymodels pipeline rather than passed directly.
Prediction
Expect the next release to follow the same trigger: either a new parsnip engine that carries external pointers, or another upstream format change in one of the engines already covered. xgboost has now forced two of the four releases.

Recent moves

  1. 8mo ago

    xgboost bundling updated for newer model versions

    Updates the xgboost bundle method for newer model versions. Narrow, but xgboost is the engine most likely to be sitting inside a saved tidymodels workflow, so a stale bundle method here breaks reload for a large share of users.

    View source ↗
  2. 1y ago

    dbarts BART models become bundleable

    Adds a bundle method for dbarts::bart() objects, which by extension covers parsnip::bart(engine = "dbarts") — Bayesian additive regression trees become portable across sessions. It also takes extra steps to preserve nfeatures and feature_names when bundling xgboost, so a reloaded model still knows what its columns were.

    View source ↗
  3. 2y ago

    Recipes steps inside workflows now bundle correctly

    Fixes bundling of recipes steps nested inside workflows. This is the case that actually occurs in tidymodels usage — the object needing external-pointer handling is rarely passed on its own, it is buried in a fitted pipeline.

    View source ↗
  4. 3y ago

    First CRAN release

    The initial CRAN release. The entry records only the fact of publication, so the package's starting coverage has to be inferred from the gaps the later releases fill.

    View source ↗