Skip to content

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

Description

@jlperla

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions