v0.42.0
DynamicPPL v0.42.0
LogDensityFunction now performs AD preparation through AbstractPPL's prepare / value_and_gradient!! interface instead of calling DifferentiationInterface directly. Internally this removes the _use_closure heuristic and the explicit DI.Constant plumbing; the choice between closure and constants now lives in AbstractPPL.
logdensity_at has been renamed to logdensity_internal. The old name is kept as a const alias so external callers do not break.
LogDensityAt is now a deprecation shim that emits a warning and returns an AbstractPPL.Evaluators.VectorEvaluator whose call forwards to logdensity_internal. New code should call AbstractPPL.prepare(logdensity_internal, x; context=...) directly.
Breaking changes
DifferentiationInterface is no longer a hard dependency of DynamicPPL. With AbstractPPL 0.15.2, the following backends now have native AbstractPPL extensions and only need the concrete AD package loaded:
AutoForwardDiff— loadForwardDiffAutoMooncake,AutoMooncakeForward— loadMooncake
For other DI-routed backends like AutoReverseDiff, users must load DifferentiationInterface together with the concrete AD package:
using DynamicPPL, ADTypes, DifferentiationInterface, ReverseDiff
ldf = LogDensityFunction(model; adtype=AutoReverseDiff())For distributed sampling the same packages must be loaded on every worker.
Compatibility bounds bumped:
AbstractPPL0.14→0.15Bijectors0.15.17→0.16
The integration test suites for MarginalLogDensities, ReverseDiff, and Enzyme now live in their own environments under test/ext/DynamicPPL*Ext/ and run as separate CI jobs.
Merged pull requests:
- Use AbstractPPL AD interface (#1363) (@yebai)
- Benchmark improvements (#1396) (@yebai)
- Update HISTORY.md for 0.42.0 (#1408) (@shravanngoswamii)
Closed issues:
- Improve DynamicPPL benchmarks (#1374)