SBC
SBC copied to clipboard
Automatically detect globals in gen quants
To use generated_quantities
with parallel processing, the user currently has to manually provide a list of "globals": A list of names of objects that are defined
in the global environment and need to present for the gen. quants. to evaluate.
It is added to the globals
argument to [future::future()], to make those
objects available on all workers.
We should be able to detect those globals automatically by inspecting the syntax trees of the expressions (this is presumably how future
does it's autodetction.
It appears the globals
package could make this a breeze (https://cran.r-project.org/web/packages/globals/index.html)