I have some code that may have failures and need to reject the sample, which I do with something like
if !(sol.retcode == :Success)
@addlogprob! -Inf
return
end
This used to work fine (though it gives a warning which doesn't appear to be possible to turn off the last time I looked). In recent DynamicPPL, though, it has additional warnings for each parameter
┌ Warning: The current proposal will be rejected due to numerical error(s).
│ isfinite.((θ, r, ℓπ, ℓκ)) = (true, true, false, true)
└ @ AdvancedHMC C:\Users\jesse\.julia\packages\AdvancedHMC\51xgc\src\hamiltonian.jl:47
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
┌ Warning: [DynamicPPL] attempt to link a linked vi
└ @ DynamicPPL C:\Users\jesse\.julia\packages\DynamicPPL\1qg3U\src\varinfo.jl:821
Is this an innocuous warning? If so, any way to turn it off (and also the one in AdvancedHMC if that has been resolved.
I have some code that may have failures and need to reject the sample, which I do with something like
This used to work fine (though it gives a warning which doesn't appear to be possible to turn off the last time I looked). In recent DynamicPPL, though, it has additional warnings for each parameter
Is this an innocuous warning? If so, any way to turn it off (and also the one in AdvancedHMC if that has been resolved.