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

Expose all DynamicHMC configuration options in DynamicNUTS #1938

Open
sethaxen opened this issue Jan 16, 2023 · 0 comments
Open

Expose all DynamicHMC configuration options in DynamicNUTS #1938

sethaxen opened this issue Jan 16, 2023 · 0 comments

Comments

@sethaxen
Copy link
Member

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:

Of these, currently Turing sets the q field of initialization to some initial point; the rest of the options are left at the defaults:

results = DynamicHMC.mcmc_keep_warmup(
rng,
ℓ,
0;
initialization = (q = vi[spl],),
reporter = DynamicHMC.NoProgressReport(),
)
. It probably makes sense for 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.

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