rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
325 stars 17 forks source link

Programs should probably be objects #23

Closed rlouf closed 3 years ago

rlouf commented 4 years ago

The HMC program is currently implemented as a closure that returns the different elements necessary to run it (warmup, results to trace, building the kernel, finding the initial position, etc).

However there is a great overlap between HMC and its variants (after all eHMC and dynamic HMC "are" a HMC algorithm) and it would be nice to have its variants inherit from HMC. It would make the code simpler, and make customization easier.

Waiting for eHMC to make the change.

rlouf commented 3 years ago

Making the change in #29. Code was too ugly.

rlouf commented 3 years ago

Programs are objects since #29 was merged. Closing.