rstudio / bundle

Prepare objects for serialization with a consistent interface
https://rstudio.github.io/bundle/
Other
27 stars 4 forks source link

test interactions with butcher #28

Closed simonpcouch closed 2 years ago

simonpcouch commented 2 years ago

Closes #22.

Surprisingly, I couldn't find any examples of butchering before bundling resulting in errors. This PR adds tests for each of the bundle methods that directly wrap native serialization methods, as well as for the workflow setups described in #22, ensuring that we can butcher before bundling.

I didn't add a vignette, as the story seems to be simpler than I had anticipated, but open to ideas for some docs here if you think this ought to be called out explicitly somewhere. :)

This PR also includes changes to bundle.workflow that the lm + step_umap tests needed—currently, the workflows bundler only bundled the recipe specification, but also needs to bundled the trained recipe.

juliasilge commented 2 years ago

This looks great! I do think we need some docs somewhere at least saying you can do this. Two ideas I have:

simonpcouch commented 2 years ago

Love the idea on the butcher and bundle roxygen template. I didn't include it in h2o, keras, and torch docs, as it seems like we don't have/need butcher support for those!