Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6 roadmap #156

Open
penelopeysm opened this issue Jan 26, 2025 · 0 comments
Open

v6 roadmap #156

penelopeysm opened this issue Jan 26, 2025 · 0 comments

Comments

@penelopeysm
Copy link
Member

penelopeysm commented Jan 26, 2025

This issue is intended to keep track of what (I think) needs to be done for a new major version of AbstractMCMC. Please feel free to comment as necessary :)

Remove Transitions

Described further in #149.

I contemplated keeping a skeletal Transition type which contains e.g. a namedtuple of params + a logp, however, I don't think AbstractMCMC is the right place to do that. If downstream packages want to have such functionality then the onus is on them to implement it.

However, imo, AbstractMCMC should provide an interface on an AbstractState type that will allow for downstream users to extract the necessary information.

Q: Should AbstractState be a type parameter of AbstractSampler?

For params we now have getparams and setparams!!; note that we don't have the equivalent for logp.

Q: should we have an interface where:

  1. getlogp(model::AbstractModel, params::AbstractVector{<:Real}) should evaluate the model at the given set of params and return the value of logp. Of course, we can't provide a concrete implementation here.
  2. getlogp([model::AbstractModel, ]state) should have a default implementation of getlogp(model, getparams(state)), but users can override this for performance if e.g. the logp value is stored in the state.

and is it possible to have another type for params that carries more information?

We don't need setlogp because logp should be uniquely determined by (model, params).

Names bikesheddable.

Q: Should we also have an interface function for obtaining the first derivative of logp?

Move default_chain_type(::AbstractSampler) from DynamicPPL to here

I think it makes much more sense for that to be here, and then it can be overloaded later.

This would also allow us to pass default_chain_type(spl) as the default value to the chain_type parameter of sample, bundle_samples, and mcmcsample

Define a clear interface for the various abstract types

Including tests.

Docs

Once the dust has settled from the above it will be a good time to write new docs imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant