Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ BinaryProvider = "0.5.6"
Distributions = "0.22"
DistributionsAD = "0.4.3"
DocStringExtensions = "0.8"
DynamicPPL = "0.4"
DynamicPPL = "0.5"
EllipticalSliceSampling = "0.2"
ForwardDiff = "0.10.3"
Libtask = "0.3.1"
Expand Down
2 changes: 1 addition & 1 deletion src/Turing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using Markdown, Libtask, MacroTools
using Tracker: Tracker

import Base: ~, ==, convert, hash, promote_rule, rand, getindex, setindex!
import DynamicPPL: getspace, runmodel!
import DynamicPPL: getspace, runmodel!, NoDist, NamedDist

const PROGRESS = Ref(true)
function turnprogress(switch::Bool)
Expand Down
4 changes: 2 additions & 2 deletions src/inference/AdvancedSMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function AbstractMCMC.sample_end!(
spl.state.average_logevidence = loge
end

function assume(spl::Sampler{<:Union{PG,SMC}}, dist::Distribution, vn::VarName, ::VarInfo)
function DynamicPPL.assume(spl::Sampler{<:Union{PG,SMC}}, dist::Distribution, vn::VarName, ::VarInfo)
vi = current_trace().vi
if vn in getspace(spl)
if ~haskey(vi, vn)
Expand Down Expand Up @@ -289,7 +289,7 @@ function assume(spl::Sampler{<:Union{PG,SMC}}, dist::Distribution, vn::VarName,
return r, 0
end

function observe(spl::Sampler{<:Union{PG,SMC}}, dist::Distribution, value, vi)
function DynamicPPL.observe(spl::Sampler{<:Union{PG,SMC}}, dist::Distribution, value, vi)
produce(logpdf(dist, value))
return 0
end
Expand Down
Loading