Skip to content

minor refactor of mcmc internals #770

@njtierney

Description

@njtierney

In attempting to do #765 via #766 I've found some parts of the code a bit harder to wrangle and reason with, and I've gotten stuck in a few places.

Specifically:

  • sampler methods don't have a "sampler_name" slot - it can be accessed by "class", but it doesn't feel idiomatic to R6
  • progress bar creation clutters the intent - e.g., in run_chain,run_samplers
  • improve clarity in run_samplers for when they are running warmup vs sampling
  • improve abstraction in run_samplers so we can perform different warmup vs sampling steps based upon the sampler used.

I'm going to try doing a small refactor of the code to make it a bit easier to reason with, before coming back to either start #766 again or branch off of #766 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions