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

Add more informative error messages. #71

Closed trappmartin closed 5 years ago

trappmartin commented 5 years ago

I just came across the error message at: https://github.com/TuringLang/AdvancedHMC.jl/blob/0814ae16a9f550bda9e4b3be5360b519bac5c144/src/hamiltonian.jl#L33

This error message should be more informative so that the user gets an idea why he gets it, i.e. in my case I suppose the model I'm looking at is misspecified. It would be good to know what is Inf.

xukai92 commented 5 years ago

I don't think the error message could be informative to that level, but I can at least make it indicate in which part (position, mometum, potential energy or its gradient, kinect energy or itsgradient) the numerical issue occurs.

xukai92 commented 5 years ago

Closed by PR #79.