From 49a77c1c1de09e05f1fff4f6311c4d8804a5daf2 Mon Sep 17 00:00:00 2001 From: William Thompson Date: Mon, 21 Oct 2024 10:51:44 -0700 Subject: [PATCH] Bug Fix: support non-stabilized variational reference --- ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl b/ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl index 28105404..1e757492 100644 --- a/ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl +++ b/ext/OctofitterPigeonsExt/OctofitterPigeonsExt.jl @@ -158,7 +158,12 @@ Base.@nospecializeinfer function MCMCChains.Chains( # Resolve the array back into the nested named tuple structure used internally. # Augment with some internal fields - samples = get_sample(pt, chain_num) + local samples + try + samples = get_sample(pt, chain_num) + catch + samples = get_sample(pt) + end chain_res = map(samples) do sample θ_t = @view(sample[begin:begin+model.D-1]) logpot = sample[model.D+1]