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
Copy file name to clipboardExpand all lines: HISTORY.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,11 @@ This version therefore excises the context argument, and instead uses `model.con
27
27
The upshot of this is that many functions that previously took a context argument now no longer do.
28
28
There were very few such functions where the context argument was actually used (most of them simply took `DefaultContext()` as the default value).
29
29
30
-
`evaluate!!(model, varinfo, ext_context)` is deprecated, and broadly speaking you should replace calls to that with `new_model = contextualize(model, ext_context); evaluate!!(new_model, varinfo)`.
30
+
`evaluate!!(model, varinfo, ext_context)` is removed, and broadly speaking you should replace calls to that with `new_model = contextualize(model, ext_context); evaluate!!(new_model, varinfo)`.
31
31
If the 'external context' `ext_context` is a parent context, then you should wrap `model.context` appropriately to ensure that its information content is not lost.
32
32
If, on the other hand, `ext_context` is a `DefaultContext`, then you can just drop the argument entirely.
33
33
34
-
To aid with this process, `contextualize` is now exported from DynamicPPL.
34
+
**To aid with this process, `contextualize` is now exported from DynamicPPL.**
35
35
36
36
The main situation where one _did_ want to specify an additional evaluation context was when that context was a `SamplingContext`.
37
37
Doing this would allow you to run the model and sample fresh values, instead of just using the values that existed in the VarInfo object.
@@ -50,9 +50,10 @@ However, here are the more user-facing ones:
50
50
51
51
And a couple of more internal changes:
52
52
53
-
-`evaluate!!`, `evaluate_threadsafe!!`, and `evaluate_threadunsafe!!` no longer accept context arguments
53
+
-Just like `evaluate!!`, the other functions `_evaluate!!`, `evaluate_threadsafe!!`, and `evaluate_threadunsafe!!` now no longer accept context arguments
54
54
-`evaluate!!` no longer takes rng and sampler (if you used this, you should use `evaluate_and_sample!!` instead, or construct your own `SamplingContext`)
55
55
- The model evaluation function, `model.f` for some `model::Model`, no longer takes a context as an argument
56
+
- The internal representation and API dealing with submodels (i.e., `ReturnedModelWrapper`, `Sampleable`, `should_auto_prefix`, `is_rhs_model`) has been simplified. If you need to check whether something is a submodel, just use `x isa DynamicPPL.Submodel`. Note that the public API i.e. `to_submodel` remains completely untouched.
0 commit comments