Turing.jl now support passing RNG to sample as a keyword argument. Although, all the randome process in AdvancedHMC.jl are correctly controlled by the passed RNG, the initialization, from Turing.jl, is not: https://github.com/TuringLang/Turing.jl/blob/master/src/inference/hmc.jl#L267. What's the best way to pass RNG to this?
In the future, which I know is not super helpful right now, the sample interface will handle the rng argument in a first-class way. The file I linked below basically forces all samplers to accept rng as the first argument, though as far as I am aware only the HMC samplers use it. The particle samplers, IS, and MH all only use the argument for dispatch and discard the actual value.
This should be easy to fix once your PR is ready.
@trappmartin do you mean it's better for me to leave this issue aside in the current PR and resolve it later?
Yeah, I think that's wise.
Can we close this?
Most helpful comment
Yeah, I think that's wise.