Celeste.jl
Celeste.jl copied to clipboard
Fix ids and lidx
The fsm_util
code uses lidx
indices, even though it is used both by DeterministicVI and the LogProbability modules. This design relies on the ids
parameterization and the lidx
parameterization having the same indices as one another for all parameters that are touched by fsm_util.jl
. Besides being brittle, we don't document what these different parameterizations mean nor that they need to overlap in this way. We also don't assert
it anywhere.
A better design would be to pass a ParamType
as an argument to the functions, and to refer to the ids
appropriate to that type.