Skip to content

Commit 7146c32

Browse files
committed
Fix StaticTransformation / ThreadSafeVarInfo link/invlink ambiguity
1 parent ec6874d commit 7146c32

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/threadsafe.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ function invlink(t::DynamicTransformation, vi::ThreadSafeVarInfo, model::Model)
115115
return invlink!!(t, deepcopy(vi), model)
116116
end
117117

118+
# These two StaticTransformation methods needed to resolve ambiguities
119+
function link!!(
120+
t::StaticTransformation{<:Bijectors.Transform}, vi::ThreadSafeVarInfo, model::Model
121+
)
122+
return Accessors.@set vi.varinfo = link!!(t, vi.varinfo, model)
123+
end
124+
125+
function invlink!!(
126+
t::StaticTransformation{<:Bijectors.Transform}, vi::ThreadSafeVarInfo, model::Model
127+
)
128+
return Accessors.@set vi.varinfo = invlink!!(t, vi.varinfo, model)
129+
end
130+
118131
function maybe_invlink_before_eval!!(vi::ThreadSafeVarInfo, model::Model)
119132
# Defer to the wrapped `AbstractVarInfo` object.
120133
# NOTE: When computing `getlogp` for `ThreadSafeVarInfo` we do include the

0 commit comments

Comments
 (0)