The current sample_chain function allows sampling a single chain but in most use cases we would want to sample multiple chains to allow more robust convergence diagnostics and if parallelized to better exploit multiple CPU cores.
Some questions are
- How to manage the output of multiple chains? Do we return a list of the per-chain results (easiest to implement) or collate each of the results fields across chains (so for example stacking the traces and statistics) which is probably more useful from a downstream perspective.
- Which parallelism framework / package to use. The built in
parallel is one option but might be better to go with packages from futureverse as it looks like this is more flexible overall and better from an end user perspective as easy to switch between different backends.
- How to get progress bar(s) working if parallelizing - if going the futureverse route then
progressr looks like a good option (see also this StackOverflow answer).
The current
sample_chainfunction allows sampling a single chain but in most use cases we would want to sample multiple chains to allow more robust convergence diagnostics and if parallelized to better exploit multiple CPU cores.Some questions are
parallelis one option but might be better to go with packages from futureverse as it looks like this is more flexible overall and better from an end user perspective as easy to switch between different backends.progressrlooks like a good option (see also this StackOverflow answer).