Skip to content

Framework adapters: Stan / PyMC / NumPyro → Simulator protocol #80

Description

@jc-macdonald

Problem

Users must write a custom class implementing the Simulator protocol for every probabilistic programming framework. Boilerplate is similar across Stan, PyMC, and NumPyro.

Proposed

Thin adapter classes that wrap a model + data into a Simulator:

  • StanSimulator(model_code, data_fn, observables)
  • PyMCSimulator(model_fn, data_fn, observables)
  • NumPyroSimulator(model_fn, data_fn, observables)

Each takes a function mapping grid config → model data dict, runs inference, and extracts observables from posteriors.

Notes

These should live in optional extras (trade-study[stan], etc.) and use deferred imports. Low priority — power users write their own adapters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowNice to havefeatureNew feature or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions