question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement ChEES-HMC

See original GitHub issue

I have a working draft of ChEES-HMC, except its not JAX-ready yet. The “Select jittered trajectory length…” line of Algorithm 1 requires a float from a predetermined Halton sequence of length wamup+sampling number of iterations. When returning the kernel after warm-up, it needs to keep yielding from the sequence at every iteration (but JAX functions need to be pure).

For now my implementation yields the next number using a scipy:

halton_sequence_gn = scipy.stats.qmc.Halton(d=1)
#then inside the kernel...
currrent_halton_number = jnp.array(halton_sequence_gn.random(n=1).squeeze())

Any help is appreciated. Will keep updated on progress.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
albcabcommented, Dec 11, 2022

Have it almost done, just some minor bugs. I’ve been pretty busy these past few months, but I have some time today so I think I can get it done 👍

1reaction
rloufcommented, Oct 21, 2022

That works too! I know the PRNG algorithm JAX uses pretty well and there’s no easy way to engineer an int sequence from it; plus since the keys are provided by the user you would get no guarantee on the ordering.

You could also do like we do for window adaptation, which is scaning over a pre-generated sequence (schedule for the window adaptation). That’s much cleaner than carrying an integer. That would be acceptable at the lower level (in mcmc.chees).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add new CheesHMC sampler by Hoffman et al #12 - GitHub
So I had a quick look. It is a new warmup scheme for the most part and here's what would be necessary: a...
Read more >
An Adaptive MCMC Scheme for Setting Trajectory Lengths in ...
We propose ChEES-HMC, a sim- ple adaptive-MCMC scheme for automatically tuning HMC's simulation-length parameter, which minimizes a proxy for the autocorre-.
Read more >
TensorFlow Probability
Use gradient ascent to adapt inner kernel's trajectory length. ... This implements something similar to ChEES HMC from [2]. import tensorflow as tf...
Read more >
SMC with HMC Kernel - Julia Discourse
There are no easy to use implementation of Buchholz et al.'s SMC as far as I know of. So you'll have to write...
Read more >
MCMC Adaptation - GitHub Pages
The frame rate reflects the computation time for integrating each trajectory. As a technical note: this demo does not use a Metropolis correction,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found