Skip to content

Commit

Permalink
Remove deprecated link! / invlink!
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Dec 8, 2024
1 parent 19e2076 commit 7a93e4b
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1215,27 +1215,6 @@ function link!!(
return Accessors.@set vi.varinfo = DynamicPPL.link!!(t, vi.varinfo, spl, model)
end

"""
link!(vi::VarInfo, spl::Sampler)
Transform the values of the random variables sampled by `spl` in `vi` from the support
of their distributions to the Euclidean space and set their corresponding `"trans"`
flag values to `true`.
"""
function link!(vi::VarInfo, spl::AbstractSampler)
Base.depwarn(
"`link!(varinfo, sampler)` is deprecated, use `link!!(varinfo, sampler, model)` instead.",
:link!,
)
return _link!(vi, spl)
end
function link!(vi::VarInfo, spl::AbstractSampler, spaceval::Val)
Base.depwarn(
"`link!(varinfo, sampler, spaceval)` is deprecated, use `link!!(varinfo, sampler, model)` instead.",
:link!,
)
return _link!(vi, spl, spaceval)
end
function _link!(vi::UntypedVarInfo, spl::AbstractSampler)
# TODO: Change to a lazy iterator over `vns`
vns = _getvns(vi, spl)
Expand Down Expand Up @@ -1313,29 +1292,6 @@ function maybe_invlink_before_eval!!(vi::VarInfo, context::AbstractContext, mode
return maybe_invlink_before_eval!!(t, vi, context, model)
end

"""
invlink!(vi::VarInfo, spl::AbstractSampler)
Transform the values of the random variables sampled by `spl` in `vi` from the
Euclidean space back to the support of their distributions and sets their corresponding
`"trans"` flag values to `false`.
"""
function invlink!(vi::VarInfo, spl::AbstractSampler)
Base.depwarn(
"`invlink!(varinfo, sampler)` is deprecated, use `invlink!!(varinfo, sampler, model)` instead.",
:invlink!,
)
return _invlink!(vi, spl)
end

function invlink!(vi::VarInfo, spl::AbstractSampler, spaceval::Val)
Base.depwarn(
"`invlink!(varinfo, sampler, spaceval)` is deprecated, use `invlink!!(varinfo, sampler, model)` instead.",
:invlink!,
)
return _invlink!(vi, spl, spaceval)
end

function _invlink!(vi::UntypedVarInfo, spl::AbstractSampler)
vns = _getvns(vi, spl)
if istrans(vi, vns[1])
Expand Down

0 comments on commit 7a93e4b

Please sign in to comment.