Skip to content

change defaults: @addlogprob! not included in PriorContext() #580

@thorek1

Description

@thorek1

Would it be possible to change the default behavior for @addlogprob! and not have it included in the PriorContext()

I understand the current solution is to do this:

if DynamicPPL.leafcontext(__context__) !== Turing.PriorContext()
    Turing.@addlogprob! myloglikelihood(x, μ)
end

as in the default is that it is included.

In my use case (see this issue) it would make the syntax much more user-friendly for end-users

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions