You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
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:
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.
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
The text was updated successfully, but these errors were encountered:
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 ofAbstractSampler
?For params we now have
getparams
andsetparams!!
; note that we don't have the equivalent for logp.Q: should we have an interface where:
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.getlogp([model::AbstractModel, ]state)
should have a default implementation ofgetlogp(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 hereI 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 thechain_type
parameter ofsample
,bundle_samples
, andmcmcsample
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
The text was updated successfully, but these errors were encountered: