Skip to content

Commit e41afca

Browse files
committed
Fix a bug and a docstring
1 parent 38662a8 commit e41afca

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/chains.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ function ParamsWithStats(
136136
include_log_probs::Bool=true,
137137
) where {Tlink}
138138
strategy = InitFromParams(
139-
VectorWithRanges{Tlink}(
140-
ldf._iden_varname_ranges, ldf._varname_ranges, param_vector
141-
),
142-
nothing,
139+
VectorWithRanges{Tlink}(ldf._varname_ranges, param_vector), nothing
143140
)
144141
accs = if include_log_probs
145142
(

src/contexts/init.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,6 @@ this `VectorWithRanges` are linked/not linked, or `nothing` if either the linkin
227227
not known or is mixed, i.e. some are linked while others are not. Using `nothing` does not
228228
affect functionality or correctness, but causes more work to be done at runtime, with
229229
possible impacts on type stability and performance.
230-
231-
In the simplest case, this could be accomplished only with a single dictionary mapping
232-
VarNames to ranges and link status. However, for performance reasons, we separate out
233-
VarNames with identity optics into a NamedTuple (`iden_varname_ranges`). All
234-
non-identity-optic VarNames are stored in the `varname_ranges` Dict.
235-
236-
It would be nice to improve the NamedTuple and Dict approach. See, e.g.
237-
https://github.com/TuringLang/DynamicPPL.jl/issues/1116.
238230
"""
239231
struct VectorWithRanges{Tlink,VNT<:VarNamedTuple,T<:AbstractVector{<:Real}}
240232
# Ranges for all VarNames

0 commit comments

Comments
 (0)