bbi 1.4.0 (specifically #514) made the change that users no longer have to specify parallel = TRUE to have submit_model() respect the number passed the threads.
Unfortunately, it also introduced a bug where passing parallel = FALSEwithout passing threads causes an error.
Example
You can reproduce this with the test suite model like so. Note that you have to pass threads = NULL to reproduce with the test model because it already has threads = 4 attached to the model object.
MOD1 %>% submit_model(.bbi_args = list(parallel = F, threads = NULL))
# Error in if (.args$threads > 1 && isFALSE(.args$parallel)) warning("`threads > 1` but model will not run in parallel because `parallel = FALSE`") :
# missing value where TRUE/FALSE needed
Desired state
The user should be able to pass submit_model(..., .bbi_args = list(parallel = FALSE)) to disable parallelization for that run.
Summary
bbi 1.4.0
(specifically #514) made the change that users no longer have to specifyparallel = TRUE
to havesubmit_model()
respect the number passed thethreads
.Unfortunately, it also introduced a bug where passing
parallel = FALSE
without passingthreads
causes an error.Example
You can reproduce this with the test suite model like so. Note that you have to pass
threads = NULL
to reproduce with the test model because it already hasthreads = 4
attached to the model object.Desired state
The user should be able to pass
submit_model(..., .bbi_args = list(parallel = FALSE))
to disable parallelization for that run.