Skip to content

Commit 2cfc297

Browse files
committed
Fix tests
1 parent bc04355 commit 2cfc297

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/ad.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest
111111

112112
# Compiling the ReverseDiff tape used to fail here
113113
spl = Sampler(MyEmptyAlg())
114+
vi = DynamicPPL.link!!(VarInfo(model), model)
114115
sampling_model = contextualize(model, SamplingContext(model.context))
115116
ldf = LogDensityFunction(
116-
sampling_model, getlogjoint_internal; adtype=AutoReverseDiff(; compile=true)
117+
sampling_model, getlogjoint_internal, vi; adtype=AutoReverseDiff(; compile=true)
117118
)
118119
x = ldf.varinfo[:]
119120
@test LogDensityProblems.logdensity_and_gradient(ldf, x) isa Any

test/contexts.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Base.IteratorEltype(::Type{<:AbstractContext}) = Base.EltypeUnknown()
5050
contexts = Dict(
5151
:default => DefaultContext(),
5252
:testparent => DynamicPPL.TestUtils.TestParentContext(DefaultContext()),
53-
:sampling => SamplingContext(),
5453
:prefix => PrefixContext(@varname(x)),
5554
:condition1 => ConditionContext((x=1.0,)),
5655
:condition2 => ConditionContext(

0 commit comments

Comments
 (0)