File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
developers/contexts/submodel-condition Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,13 @@ unwrap_sampling_context(ctx::DynamicPPL.SamplingContext) = ctx.context
108
108
unwrap_sampling_context(ctx::DynamicPPL.AbstractContext) = ctx
109
109
110
110
@model function inner()
111
- println("inner context: $(unwrap_sampling_context(model .context))")
111
+ println("inner context: $(unwrap_sampling_context(__model__ .context))")
112
112
x ~ Normal()
113
113
return y ~ Normal()
114
114
end
115
115
116
116
@model function outer()
117
- println("outer context: $(unwrap_sampling_context(model .context))")
117
+ println("outer context: $(unwrap_sampling_context(__model__ .context))")
118
118
return a ~ to_submodel(inner())
119
119
end
120
120
@@ -124,7 +124,7 @@ with_outer_cond = outer() | (@varname(a.x) => 1.0)
124
124
# 'Inner conditioning'
125
125
inner_cond = inner() | (@varname(x) => 1.0)
126
126
@model function outer2()
127
- println("outer context: $(unwrap_sampling_context(model .context))")
127
+ println("outer context: $(unwrap_sampling_context(__model__ .context))")
128
128
return a ~ to_submodel(inner_cond)
129
129
end
130
130
with_inner_cond = outer2()
You can’t perform that action at this time.
0 commit comments