[Finalize API] Samplers
Created by: PhilipVinc
Right now our Sampler API states that all samplers should define sample_chain
and sample_step
.
This is a bit weird, as sample_step
is really a MCMC-specific topic, which should not be defined for things like direct samplers (ARNN, Exact...). In fact, ARNNSampler
does not define it, which is the correct thing to do.
Also, this ends up having n_chains
for ARNNSampler
and Exactampler
which makes no sense at all.
I think we should slightly modify the current API: AbstractSampler
should only define sample
or sample_batch
and return samples as a 2 dimensional vector.
MCSamplers should also defined sample_step
and return samples as a 3 dimentional tensor, as they do now.
The only weird thing is that we would have that vs.samples
will now be either a 2D or 3D vector, but as all our code works with both cases right now, I don't think this is particularly an issue.
@wdphy16 I'm assigning this to you. After everyone has agreed on this change, could you work on that when you have some time? it should be relatively straightforward and fast to implement.