@@ -551,22 +551,22 @@ variables, and one might need it to be linked while the other doesn't.
551551"""
552552function 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
0 commit comments