diff --git a/Project.toml b/Project.toml index 2e1b5e3d3..b0251a598 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Turing" uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" -version = "0.28" +version = "0.28.1" [deps] diff --git a/src/inference/AdvancedSMC.jl b/src/inference/AdvancedSMC.jl index ff80553db..22c5b6140 100644 --- a/src/inference/AdvancedSMC.jl +++ b/src/inference/AdvancedSMC.jl @@ -331,15 +331,16 @@ function DynamicPPL.assume( vn::VarName, __vi__::AbstractVarInfo ) - local vi - trace = AdvancedPS.current_trace() - trng = trace.rng + local vi, trng try + trace = AdvancedPS.current_trace() + trng = trace.rng vi = trace.model.f.varinfo catch e # NOTE: this heuristic allows Libtask evaluating a model outside a `Trace`. if e == KeyError(:__trace) || current_task().storage isa Nothing vi = __vi__ + trng = rng else rethrow(e) end