Open JaimeRZP opened 1 year ago
Hi @JaimeRZP, I think this is a historical issue - the AHMC.sample
function predates the AbstractMCMC
package. We can now depreciate the AHMC.sample
function and remove it in future releases. We can promote the AbstractMCMC.sample
API more so users can switch to this interface.
Ok that's interesting. I was proposing to get rid of both but keep the instance of AbstractMCMC.sample
seems reasonable to me. One thing that I am doing in #325 is to change the signature of AbstractMCMC.sample
from:
function AbstractMCMC.sample(
model::LogDensityModel,
kernel::AbstractMCMCKernel,
metric::AbstractMetric,
adaptor::AbstractAdaptor,
N::Integer;
kwargs...,
)
to
function AbstractMCMC.sample(
model::LogDensityModel,
sampler::AbstractHMCSampler,
N::Integer;
kwargs...,
)
where AbstractHMCSampler
is the umbrella type of all new constructors.
Do we still need this function after #325? It feels a bit redundant to me. Maybe we can depreciate it?
I think even though #325 is now merged. Having this function here is probably still useful if users want to use the AbstractMCMC interface without loading Turing. However, I would remove AHMC.Sample.
Dear Team,
At the moment AdvancedHMC AbstractMCMC interface pirates
AbstractMCMC.Sample
function a la Turing.Currently we are working on allowing Turing to take in
AbstractMCMC.AbstractSampler
as a sampler. At the moment efforts are focused on these two PR's:AbstractMCMC.AbstractSampler
samplers.Once these two PR's go through users will be able to do what the current type piracy of
AbstractMCMC.Sample
does through Turing.My question is, should we then remove
AbstractMCMC.Sample
from AdvancedHMC?Pro's:
Con's
All the best, Jaime