Skip to content

Support sampling multiple chains ideally with option for parallelizing #18

Description

@matt-graham

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions