TuringLang / AdvancedHMC.jl

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms
https://turinglang.org/AdvancedHMC.jl/
MIT License
228 stars 39 forks source link

Step size initialization uses GLOBAL RNG instead of reproducible RNG from caller #306

Open getzdan opened 1 year ago

getzdan commented 1 year ago

https://github.com/TuringLang/AdvancedHMC.jl/blob/6a55a3f3f341c90a70491267635acb51dd989463/src/trajectory.jl#L770

This caused an actual reproducibility problem, see Discourse thread: https://discourse.julialang.org/t/stablerng-in-turing-is-not-producing-reproducible-output/92032

To get RNG from caller, it might need to be perculated down from callers, with a few other changes needed.