Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Nov 15, 2024
1 parent 2c2800b commit b7b01cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/dynamicppl/varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ using Turing
alg = HMC(0.1, 5)
spl = DynamicPPL.Sampler(alg, model)
v = copy(meta.vals)
DynamicPPL.link!(vi, spl)
DynamicPPL.link!!(vi, spl, model)
@test all(x -> DynamicPPL.istrans(vi, x), meta.vns)
DynamicPPL.invlink!(vi, spl)
DynamicPPL.invlink!!(vi, spl, model)
@test all(x -> !DynamicPPL.istrans(vi, x), meta.vns)
@test meta.vals == v

Expand All @@ -64,10 +64,10 @@ using Turing
@test all(x -> !DynamicPPL.istrans(vi, x), meta.m.vns)
v_s = copy(meta.s.vals)
v_m = copy(meta.m.vals)
DynamicPPL.link!(vi, spl)
DynamicPPL.link!!(vi, spl, model)
@test all(x -> DynamicPPL.istrans(vi, x), meta.s.vns)
@test all(x -> DynamicPPL.istrans(vi, x), meta.m.vns)
DynamicPPL.invlink!(vi, spl)
DynamicPPL.invlink!!(vi, spl, model)
@test all(x -> !DynamicPPL.istrans(vi, x), meta.s.vns)
@test all(x -> !DynamicPPL.istrans(vi, x), meta.m.vns)
@test meta.s.vals == v_s
Expand Down Expand Up @@ -347,7 +347,7 @@ using Turing

n = 10
model = state_space(y, length(t))
@test size(sample(model, NUTS(; adtype=AutoReverseDiff(true)), n), 1) == n
@test size(sample(model, NUTS(; adtype=AutoReverseDiff(; compile=true)), n), 1) == n
end

if Threads.nthreads() > 1
Expand Down

0 comments on commit b7b01cb

Please sign in to comment.