Skip to content

Commit

Permalink
address inflation of model_stack object size (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Jul 15, 2024
1 parent 695540d commit 2aacf23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# stacks (development version)

* Addressed inflation of butchered model stack object size after saving and
reloading (#214).

# stacks 1.0.4

* Introduced support for parallel processing using the [future](https://www.futureverse.org/) framework. The stacks package previously supported parallelism with foreach, and users can use either framework for now. In a future release, stacks will begin the deprecation cycle for parallelism with foreach, so we encourage users to begin migrating their code now. See [the _Parallel Processing_ section in the tune package's "Optimizations" article](https://tune.tidymodels.org/articles/extras/optimizations.html#parallel-processing) to learn more (#866).
Expand Down
5 changes: 5 additions & 0 deletions R/blend_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ check_blend_data_stack <- function(data_stack) {

process_data_stack <- function(data_stack) {
dat <- tibble::as_tibble(data_stack) %>% na.omit()

# retain only the tbl_df attributes (#214)
attributes(dat) <- attributes(dat)[
names(attributes(tibble::new_tibble(list())))
]

if (nrow(dat) == 0) {
cli_abort(
Expand Down

0 comments on commit 2aacf23

Please sign in to comment.