DynamicPPL.jl
DynamicPPL.jl copied to clipboard
"[DynamicPPL] attempt to link a linked vi" warning when aborting sampling and returning minus infinity
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'm having trouble identifying what change in DPPL is causing this tbh; I'll have to do some digging. I also can't reproduce this issue with an example model, e.g. DynamicPPL.TestUtils.demo_dot_assume_dot_observe() :confused:
It shouldn't cause any issues wrt. correctness though because it just goes "oh, it's already linked; I won't link it then". But stilll weird that it shows up, so I'm slightly worried.
I am getting the same warning on a model I just started working on. Can you please elaborate on what exactly it means for end users? The message isn't very helpful.
I'm also getting this warning.
@torfjelde will #417 fix this?
No, not that I'm aware of. I think this is an issue in Turing, but needs a bit more digging to find the source.
This is likely resolved. Please re-open if similar issues are observed again.