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
Previously, the final line would return the variable names `c.a.x` and `c.b.x`.
33
+
With this version, it will return`a.c.x` and `b.c.x`, which is more intuitive.
34
+
(Note that this change brings `to_submodel`'s behaviour in line with the now-deprecated `@submodel` macro.)
35
+
36
+
This change also affects sampling in Turing.jl.
38
37
39
38
## 0.34.2
40
39
41
-
- Fixed bugs in ValuesAsInModelContext as well as DebugContext where underlying PrefixContexts were not being applied.
42
-
From a user-facing perspective, this means that for models which use manually prefixed submodels, e.g.
43
-
44
-
```julia
45
-
using DynamicPPL, Distributions
46
-
47
-
@modelinner() = x ~Normal()
48
-
49
-
@modelfunctionouter()
50
-
x1 ~to_submodel(prefix(inner(), :a), false)
51
-
x2 ~to_submodel(prefix(inner(), :b), false)
52
-
end
53
-
```
54
-
55
-
will: (1) no longer error when sampling due to `check_model_and_trace`; and (2) contain both submodel's variables in the resulting chain (the behaviour before this patch was that the second `x` would override the first `x`).
56
-
57
-
- More broadly, implemented a general `prefix(ctx::AbstractContext, ::VarName)` which traverses the context tree in `ctx` to apply all necessary prefixes. This was a necessary step in fixing the above issues, but it also means that `prefix` is now capable of handling context trees with e.g. multiple prefixes at different levels of nesting.
40
+
- Fixed bugs in ValuesAsInModelContext as well as DebugContext where underlying PrefixContexts were not being applied.
41
+
From a user-facing perspective, this means that for models which use manually prefixed submodels, e.g.
will: (1) no longer error when sampling due to `check_model_and_trace`; and (2) contain both submodel's variables in the resulting chain (the behaviour before this patch was that the second `x` would override the first `x`).
55
+
56
+
- More broadly, implemented a general `prefix(ctx::AbstractContext, ::VarName)` which traverses the context tree in`ctx` to apply all necessary prefixes. This was a necessary step in fixing the above issues, but it also means that `prefix` is now capable of handling context trees with e.g. multiple prefixes at different levels of nesting.
58
57
59
58
## 0.34.1
60
59
61
-
- Fix an issue that prevented merging two VarInfos if they had different dimensions for a variable.
60
+
- Fix an issue that prevented merging two VarInfos if they had different dimensions for a variable.
62
61
63
-
- Upper bound the compat version of KernelAbstractions to work around an issue in determining the right VarInfo type to use.
62
+
- Upper bound the compat version of KernelAbstractions to work around an issue in determining the right VarInfo type to use.
64
63
65
64
## 0.34.0
66
65
67
66
**Breaking**
68
67
69
-
-`rng` argument removed from `values_as_in_model`, and `varinfo` made non-optional. This means that the only signatures allowed are
If you aren't using this function (it's probably only used in Turing.jl) then this won't affect you.
77
76
78
77
## 0.33.1
79
78
@@ -84,10 +83,10 @@ There are no changes to the public-facing API, but internally you can no longer
84
83
85
84
**Breaking**
86
85
87
-
-`values_as_in_model()` now requires an extra boolean parameter, specifying whether variables on the lhs of `:=` statements are to be included in the resulting `OrderedDict` of values.
88
-
The type signature is now `values_as_in_model([rng,] model, include_colon_eq::Bool [, varinfo, context])`
86
+
-`values_as_in_model()` now requires an extra boolean parameter, specifying whether variables on the lhs of `:=` statements are to be included in the resulting `OrderedDict` of values.
87
+
The type signature is now `values_as_in_model([rng,] model, include_colon_eq::Bool [, varinfo, context])`
89
88
90
89
**Other**
91
90
92
-
- Moved the implementation of `predict` from Turing.jl to DynamicPPL.jl; the user-facing behaviour is otherwise the same
93
-
- Improved error message when a user tries to initialise a model with parameters that don't correspond strictly to the underlying VarInfo used
91
+
- Moved the implementation of `predict` from Turing.jl to DynamicPPL.jl; the user-facing behaviour is otherwise the same
92
+
- Improved error message when a user tries to initialise a model with parameters that don't correspond strictly to the underlying VarInfo used
0 commit comments