Skip to content

Commit 5f60c46

Browse files
committed
update test to match logjac accumulator
1 parent 3aa818a commit 5f60c46

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/contexts.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,12 @@ Base.IteratorEltype(::Type{<:AbstractContext}) = Base.EltypeUnknown()
518518
@test DynamicPPL.istrans(new_vi)
519519
# this is the unlinked value, since it uses `getindex`
520520
a = new_vi[@varname(a)]
521-
# logp should correspond to the transformed value
522-
@test isapprox(DynamicPPL.getlogjoint(new_vi), logpdf(Normal(), log(a)))
521+
# internal logjoint should correspond to the transformed value
522+
@test isapprox(
523+
DynamicPPL.getlogjoint_internal(new_vi), logpdf(Normal(), log(a))
524+
)
525+
# user logjoint should correspond to the transformed value
526+
@test isapprox(DynamicPPL.getlogjoint(new_vi), logpdf(LogNormal(), a))
523527
@test isapprox(
524528
only(DynamicPPL.getindex_internal(new_vi, @varname(a))), log(a)
525529
)

0 commit comments

Comments
 (0)