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
* Fast Log Density Function
* Make it work with AD
* Optimise performance for identity VarNames
* Mark `get_range_and_linked` as having zero derivative
* Update comment
* make AD testing / benchmarking use FastLDF
* Fix tests
* Optimise away `make_evaluate_args_and_kwargs`
* const func annotation
* Disable benchmarks on non-typed-Metadata-VarInfo
* Fix `_evaluate!!` correctly to handle submodels
* Actually fix submodel evaluate
* Document thoroughly and organise code
* Support more VarInfos, make it thread-safe (?)
* fix bug in parsing ranges from metadata/VNV
* Fix get_param_eltype for TSVI
* Disable Enzyme benchmark
* Don't override _evaluate!!, that breaks ForwardDiff (sometimes)
* Move FastLDF to experimental for now
* Fix imports, add tests, etc
* More test fixes
* Fix imports / tests
* Remove AbstractFastEvalContext
* Changelog and patch bump
* Add correctness tests, fix imports
* Concretise parameter vector in tests
* Add zero-allocation tests
* Add Chairmarks as test dep
* Disable allocations tests on multi-threaded
* Fast InitContext (#1125)
* Make InitContext work with OnlyAccsVarInfo
* Do not convert NamedTuple to Dict
* remove logging
* Enable InitFromPrior and InitFromUniform too
* Fix `infer_nested_eltype` invocation
* Refactor FastLDF to use InitContext
* note init breaking change
* fix logjac sign
* workaround Mooncake segfault
* fix changelog too
* Fix get_param_eltype for context stacks
* Add a test for threaded observe
* Export init
* Remove dead code
* fix transforms for pathological distributions
* Tidy up loads of things
* fix typed_identity spelling
* fix definition order
* Improve docstrings
* Remove stray comment
* export get_param_eltype (unfortunatley)
* Add more comment
* Update comment
* Remove inlines, fix OAVI docstring
* Improve docstrings
* Simplify InitFromParams constructor
* Replace map(identity, x[:]) with [i for i in x[:]]
* Simplify implementation for InitContext/OAVI
* Add another model to allocation tests
Co-authored-by: Markus Hauru <[email protected]>
* Revert removal of dist argument (oops)
* Format
* Update some outdated bits of FastLDF docstring
* remove underscores
---------
Co-authored-by: Markus Hauru <[email protected]>
Copy file name to clipboardExpand all lines: HISTORY.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,21 @@ You should not need to use these directly, please use `AbstractPPL.condition` an
21
21
22
22
Removed the method `returned(::Model, values, keys)`; please use `returned(::Model, ::AbstractDict{<:VarName})` instead.
23
23
24
+
The method `DynamicPPL.init` (for implementing `AbstractInitStrategy`) now has a different signature: it must return a tuple of the generated value, plus a transform function that maps it back to unlinked space.
25
+
This is a generalisation of the previous behaviour, where `init` would always return an unlinked value (in effect forcing the transform to be the identity function).
26
+
27
+
### Other changes
28
+
29
+
#### FastLDF
30
+
31
+
Added `DynamicPPL.Experimental.FastLDF`, a version of `LogDensityFunction` that provides performance improvements on the order of 2–10× for both model evaluation as well as automatic differentiation.
32
+
Exact speedups depend on the model size: larger models have less significant speedups because the bulk of the work is done in calls to `logpdf`.
33
+
34
+
Please note that `FastLDF` is currently considered internal and its API may change without warning.
35
+
We intend to replace `LogDensityFunction` with `FastLDF` in a release in the near future, but until then we recommend not using it.
36
+
37
+
For more information about `FastLDF`, please see https://github.com/TuringLang/DynamicPPL.jl/pull/1113 as well as the `src/fasteval.jl` file, which contains extensive comments.
38
+
24
39
## 0.38.9
25
40
26
41
Remove warning when using Enzyme as the AD backend.
Copy file name to clipboardExpand all lines: docs/src/api.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,12 @@ DynamicPPL.prefix
170
170
171
171
## Utilities
172
172
173
+
`typed_identity` is the same as `identity`, but with an overload for `with_logabsdet_jacobian` that ensures that it never errors.
174
+
175
+
```@docs
176
+
typed_identity
177
+
```
178
+
173
179
It is possible to manually increase (or decrease) the accumulated log likelihood or prior from within a model function.
174
180
175
181
```@docs
@@ -517,10 +523,12 @@ InitFromParams
517
523
```
518
524
519
525
If you wish to write your own, you have to subtype [`DynamicPPL.AbstractInitStrategy`](@ref) and implement the `init` method.
526
+
In very rare situations, you may also need to implement `get_param_eltype`, which defines the element type of the parameters generated by the strategy.
0 commit comments