Repository navigation
Q: Do workflow sets require bundling? #73
Description
Activity
If the fitted workflow set contains any workflows that would require bundling themselves (xgboost, h2o, bart, etc), then it would need to be bundled before saving. This isn't currently supported by the package.
I think this method could work by just mapping
swap_elementover the fitted workflows and then the same function over them on reload; could probably look a lot like the workflow method itself.cc @hfrick, the workflowsets maintainer :)
- addedfeaturea feature request or enhancementa feature request or enhancement
on May 27, 2025 If the fitted workflow set contains any workflows that would require bundling themselves (xgboost, h2o, bart, etc), then it would need to be bundled before saving. This isn't currently supported by the package.
I think this method could work by just mapping
swap_elementover the fitted workflows and then the same function over them on reload; could probably look a lot like the workflow method itself.cc @hfrick, the workflowsets maintainer :)
Thanks @simonpcouch. My workflow set does contain xgboost. Perhaps I could build a loop through the workflow set to select each individual combination of parameters in turn, bundle and save? Then I'd have a folder of all the bundled workflows, but then reading that back into a new R session and recreating the workflow set I imagine will not maintain the original referencing?
I have a new but related problem where I have unbundled the results of my tuning process into a new script. I have selected one combination of tuning parameters and I want to rebuild the workflow with these new parameters and an unbundled recipe e.g.:
best_model <- boost_tree( tree_depth = best_tree_depth_var, learn_rate = best_learn_rate_var, ... ) |> set_mode("classification") |> set_engine("xgboost") best_workflow <- workflow() |> add_model(best_model) |> add_recipe(unbundled_recipe)
This works, however when I call
fit(best_workflow, unbundled_training_set), an error is called early at a step of the preprocessing recipe which "could not find function "all_nominal_predictors"". I have checked that the packagerecipesis loaded in, and I still get this error. Please can you advise on how to fix @simonpcouch ?
I have performed a tuning process on a workflow set containing four workflows, which has taken 3-4 hours to complete. Because of the long processing time, I would like to save the completed workflow set so that it can be reloaded into a future R session without having to run the tuning again.
I tried to bundle the workflow set and save it using
saveRDS(workflow_set), however it would not work. Unfortunately I didn't save the error message, but I'm pretty sure it said that I had to select one combination of tuning parameters for each of the four workflows, then I was allowed to bundle and save them individually. This is not ideal as I would like to perform some analysis/create visualisations of the tuning process, and for this I need to have all combinations of tuning parameters and the corresponding metrics.The question is do I need to bundle the complete workflow set, or is it sufficient to simply call
saveRDS(workflow_set)?