Skip to content

Commit 89a61af

Browse files
committed
istrans -> is_transformed
1 parent 16198fa commit 89a61af

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/mcmc/gibbs.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,22 +551,22 @@ variables, and one might need it to be linked while the other doesn't.
551551
"""
552552
function match_linking!!(varinfo_local, prev_state_local, model)
553553
prev_varinfo_local = get_varinfo(prev_state_local)
554-
was_linked = DynamicPPL.istrans(prev_varinfo_local)
555-
is_linked = DynamicPPL.istrans(varinfo_local)
554+
was_linked = DynamicPPL.is_transformed(prev_varinfo_local)
555+
is_linked = DynamicPPL.is_transformed(varinfo_local)
556556
if was_linked && !is_linked
557557
varinfo_local = DynamicPPL.link!!(varinfo_local, model)
558558
elseif !was_linked && is_linked
559559
varinfo_local = DynamicPPL.invlink!!(varinfo_local, model)
560560
end
561561
# TODO(mhauru) The above might run into trouble if some variables are linked and others
562-
# are not. `istrans(varinfo)` returns an `all` over the individual variables. This could
562+
# are not. `is_transformed(varinfo)` returns an `all` over the individual variables. This could
563563
# especially be a problem with dynamic models, where new variables may get introduced,
564564
# but also in cases where component samplers have partial overlap in their target
565565
# variables. The below is how I would like to implement this, but DynamicPPL at this
566566
# time does not support linking individual variables selected by `VarName`. It soon
567567
# should though, so come back to this.
568568
# Issue ref: https://github.com/TuringLang/Turing.jl/issues/2401
569-
# prev_links_dict = Dict(vn => DynamicPPL.istrans(prev_varinfo_local, vn) for vn in keys(prev_varinfo_local))
569+
# prev_links_dict = Dict(vn => DynamicPPL.is_transformed(prev_varinfo_local, vn) for vn in keys(prev_varinfo_local))
570570
# any_linked = any(values(prev_links_dict))
571571
# for vn in keys(varinfo_local)
572572
# was_linked = if haskey(prev_varinfo_local, vn)
@@ -576,7 +576,7 @@ function match_linking!!(varinfo_local, prev_state_local, model)
576576
# # of the variables of the old state were linked.
577577
# any_linked
578578
# end
579-
# is_linked = DynamicPPL.istrans(varinfo_local, vn)
579+
# is_linked = DynamicPPL.is_transformed(varinfo_local, vn)
580580
# if was_linked && !is_linked
581581
# varinfo_local = DynamicPPL.invlink!!(varinfo_local, vn)
582582
# elseif !was_linked && is_linked

src/optimisation/Optimisation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function StatsBase.informationmatrix(
274274
# Convert the values to their unconstrained states to make sure the
275275
# Hessian is computed with respect to the untransformed parameters.
276276
old_ldf = m.f.ldf
277-
linked = DynamicPPL.istrans(old_ldf.varinfo)
277+
linked = DynamicPPL.is_transformed(old_ldf.varinfo)
278278
if linked
279279
new_vi = DynamicPPL.invlink!!(old_ldf.varinfo, old_ldf.model)
280280
new_f = OptimLogDensity(

0 commit comments

Comments
 (0)