Skip to content

Commit 9360f18

Browse files
committed
more fixes
1 parent cd52e9f commit 9360f18

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/mcmc/particle_mcmc.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ function AdvancedPS.advance!(
3535
trace::AdvancedPS.Trace{<:AdvancedPS.LibtaskModel{<:TracedModel}}, isref::Bool=false
3636
)
3737
# Make sure we load/reset the rng in the new replaying mechanism
38-
DynamicPPL.increment_num_produce!(trace.model.f.varinfo)
38+
trace.model.f.varinfo = DynamicPPL.increment_num_produce!!(trace.model.f.varinfo)
3939
isref ? AdvancedPS.load_state!(trace.rng) : AdvancedPS.save_state!(trace.rng)
4040
score = consume(trace.model.ctask)
4141
if score === nothing
4242
return nothing
4343
else
44-
return score + DynamicPPL.getlogp(trace.model.f.varinfo)
44+
return score + DynamicPPL.getlogjoint(trace.model.f.varinfo)
4545
end
4646
end
4747

@@ -128,7 +128,7 @@ function SMCTransition(model::DynamicPPL.Model, vi::AbstractVarInfo, weight)
128128

129129
# This is pretty useless since we reset the log probability continuously in the
130130
# particle sweep.
131-
lp = getlogp(vi)
131+
lp = DynamicPPL.getlogjoint(vi)
132132

133133
return SMCTransition(theta, lp, weight)
134134
end
@@ -307,7 +307,7 @@ function PGTransition(model::DynamicPPL.Model, vi::AbstractVarInfo, logevidence)
307307

308308
# This is pretty useless since we reset the log probability continuously in the
309309
# particle sweep.
310-
lp = getlogp(vi)
310+
lp = DynamicPPL.getlogjoint(vi)
311311

312312
return PGTransition(theta, lp, logevidence)
313313
end

src/mcmc/sghmc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ end
200200

201201
function SGLDTransition(model::DynamicPPL.Model, vi::AbstractVarInfo, stepsize)
202202
theta = getparams(model, vi)
203-
lp = getlogp(vi)
203+
lp = DynamicPPL.getlogjoint(vi)
204204
return SGLDTransition(theta, lp, stepsize)
205205
end
206206

0 commit comments

Comments
 (0)