diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c9766e0cf..dd19a48a3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -96,7 +96,15 @@ jobs: working-directory: test/ext/DynamicPPLReverseDiffExt run: | julia --project=. --color=yes -e 'using Pkg; Pkg.instantiate()' - julia --project=. --color=yes main.jl + julia --project=. --color=yes --code-coverage=user main.jl + + - uses: julia-actions/julia-processcoverage@v1 + + - uses: codecov/codecov-action@v6 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true marginallogdensities: runs-on: ubuntu-latest @@ -113,4 +121,12 @@ jobs: working-directory: test/ext/DynamicPPLMarginalLogDensitiesExt run: | julia --project=. --color=yes -e 'using Pkg; Pkg.instantiate()' - julia --project=. --color=yes main.jl + julia --project=. --color=yes --code-coverage=user main.jl + + - uses: julia-actions/julia-processcoverage@v1 + + - uses: codecov/codecov-action@v6 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.github/workflows/Enzyme.yml b/.github/workflows/Enzyme.yml index 318b8ec9a..23a2a5a0c 100644 --- a/.github/workflows/Enzyme.yml +++ b/.github/workflows/Enzyme.yml @@ -32,4 +32,12 @@ jobs: working-directory: test/ext/DynamicPPLEnzymeCoreExt run: | julia --project=. --color=yes -e 'using Pkg; Pkg.instantiate()' - julia --project=. --color=yes main.jl + julia --project=. --color=yes --code-coverage=user main.jl + + - uses: julia-actions/julia-processcoverage@v1 + + - uses: codecov/codecov-action@v6 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/HISTORY.md b/HISTORY.md index 43ce5af3d..f1245ed48 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,34 @@ +# 0.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` — load `ForwardDiff` + - `AutoMooncake`, `AutoMooncakeForward` — load `Mooncake` + +For other DI-routed backends like `AutoReverseDiff`, users must load `DifferentiationInterface` together with the concrete AD package: + +```julia +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: + + - `AbstractPPL` `0.14` → `0.15` + - `Bijectors` `0.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. + # 0.41.8 Override `MarginalLogDensities.optimize_marginal!` for `LogDensityFunctionWrapper` so the underlying `OptimizationProblem` is rebuilt with the current non-marginalised parameters on each call, rather than reusing a stale problem.