Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"[DynamicPPL] attempt to link a linked vi" warning when aborting sampling and returning minus infinity #422

Closed
jlperla opened this issue Aug 16, 2022 · 6 comments

Comments

@jlperla
Copy link

jlperla commented Aug 16, 2022

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.

@torfjelde
Copy link
Member

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() 😕

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.

@juliohm
Copy link

juliohm commented Sep 20, 2022

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.

@CiaranOMara
Copy link

I'm also getting this warning.

@yebai
Copy link
Member

yebai commented Nov 2, 2022

@torfjelde will #417 fix this?

@torfjelde
Copy link
Member

torfjelde commented Nov 3, 2022 via email

@yebai
Copy link
Member

yebai commented May 7, 2024

This is likely resolved. Please re-open if similar issues are observed again.

@yebai yebai closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants