Description
Currently DynamicNUTS
in https://github.com/TuringLang/Turing.jl/blob/master/src/contrib/inference/dynamichmc.jl doesn't expose most of the configuration options for DynamicHMC. The complete set of options (with defaults) is:
initialization = ()
warmup_stages = DynamicHMC.default_warmup_stages()
algorithm = DynamicHMC.NUTS()
reporter = DynamicHMC.NoProgressReport()
For descriptions of these, see https://www.tamaspapp.eu/DynamicHMC.jl/stable/interface/#DynamicHMC.mcmc_with_warmup
Of these, currently Turing sets the q
field of initialization
to some initial point; the rest of the options are left at the defaults:
Turing.jl/src/contrib/inference/dynamichmc.jl
Lines 71 to 77 in c9409e2
reporter
to be left at the default to not interfere with AbstractMCMC's own logging.
A good start might be to redefine:
struct DynamicNUTS{AD,space,I,W,A} <: Hamiltonian{AD}
initialization::I
warmup_stages::W
algorithm::A
end
and add constructors for DynamicNUTS
that populate the new fields with their defaults if not provided by the user. Then the above call to mcmc_keep_warmup
needs to be updated to provide these keywords.
For reference, the SampleChainsDynamicHMC implementation at https://github.com/cscherrer/SampleChainsDynamicHMC.jl/blob/master/src/SampleChainsDynamicHMC.jl allows each of these configuration options to be specified.