You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support of using NamedTuple for initial_params input was introduced in #632.
Current implementation of set_values!! , which handles the initialization, does not support initializing variables that are subsumed by a varname provided in the NamedTuple.
For example, if the model contains X[1], it won’t work if initial_params is passed as (; X = ...).
To enable this functionality, we could consider adding support for using OrderedDict.
Additionally, as mentioned in TuringLang/Turing.jl#2452 , the error message can be improved when the provided vector does not conform to AbstractVector{<:Union{Real, Missing}}.
The text was updated successfully, but these errors were encountered:
Does it specifically have to be an OrderedDict (as opposed to any ordinary Dict)?
Yes, this is due to some internal design choices of SimpleVarInfo{OrderedDict}, which was motivated to store the parameters in a specific ordering, IIRC.
ref TuringLang/Turing.jl#2452
Support of using
NamedTuple
forinitial_params
input was introduced in #632.Current implementation of
set_values!!
, which handles the initialization, does not support initializing variables that are subsumed by a varname provided in the NamedTuple.For example, if the model contains
X[1]
, it won’t work ifinitial_params
is passed as(; X = ...)
.To enable this functionality, we could consider adding support for using
OrderedDict
.Additionally, as mentioned in TuringLang/Turing.jl#2452 , the error message can be improved when the provided vector does not conform to
AbstractVector{<:Union{Real, Missing}}
.The text was updated successfully, but these errors were encountered: