For users wanting to parallelize each individual model run, a common approach is to attach bbi_args to the model object. Bootstrap runs should inherit these settings so that, by default, they run with the same parallelization settings as the run they were generated from.
.m <- read_model(...) %>% add_bbi_args(list(threads = 4, parallel = TRUE))
print(.m$bbi_args)
# $threads
# [1] 4
#
# $parallel
# [1] TRUE
.boot <- new_bootstrap_run(.m)
print(.boot$bbi_args)
# $threads
# [1] 4
#
# $parallel
# [1] TRUE
### this ^ is good
.boot <- setup_bootstrap_run(.boot, n = 10, seed = 1234)
.bm1 <- get_boot_models(.boot)[[1]]
.bm1$bbi_args
# NULL
### this ^ is not good
For users wanting to parallelize each individual model run, a common approach is to attach
bbi_args
to the model object. Bootstrap runs should inherit these settings so that, by default, they run with the same parallelization settings as the run they were generated from.