Skip to content

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Oct 21, 2025

This is the regular PR for accumulating breaking changes, to be released in the next minor version of DynamicPPL.

Potential 0.39 changes

Largely speaking I (Penny) am fairly happy with the general state of DPPL now. By far the biggest pain point for me, and the only thing I feel like I really want to change in the short term, is ThreadSafeVarInfo. Apart from that, in my opinion, it's now a good time to spend more resources on Turing, samplers, and optimisation.

Suggestions welcome.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 90.50279% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.84%. Comparing base (08fffa2) to head (535ce4f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/contexts/conditionfix.jl 79.16% 5 Missing ⚠️
src/contexts.jl 50.00% 4 Missing ⚠️
src/onlyaccs.jl 75.00% 3 Missing ⚠️
src/compiler.jl 85.71% 2 Missing ⚠️
ext/DynamicPPLEnzymeCoreExt.jl 0.00% 1 Missing ⚠️
src/fasteval.jl 98.61% 1 Missing ⚠️
src/utils.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1082      +/-   ##
==========================================
+ Coverage   81.48%   81.84%   +0.35%     
==========================================
  Files          40       42       +2     
  Lines        3845     3921      +76     
==========================================
+ Hits         3133     3209      +76     
  Misses        712      712              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

Benchmark Report for Commit 535ce4f

Computer Information

Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

┌───────────────────────┬───────┬─────────────┬───────────────────┬────────┬────────────────┬─────────────────┐
│                 Model │   Dim │  AD Backend │           VarInfo │ Linked │ t(eval)/t(ref) │ t(grad)/t(eval) │
├───────────────────────┼───────┼─────────────┼───────────────────┼────────┼────────────────┼─────────────────┤
│ Simple assume observe │     1 │ forwarddiff │             typed │  false │            6.6 │             1.7 │
│           Smorgasbord │   201 │ forwarddiff │             typed │  false │          739.0 │            42.6 │
│           Smorgasbord │   201 │ forwarddiff │ simple_namedtuple │   true │          429.8 │            54.7 │
│           Smorgasbord │   201 │ forwarddiff │           untyped │   true │          787.9 │            36.4 │
│           Smorgasbord │   201 │ forwarddiff │       simple_dict │   true │         7395.2 │            25.3 │
│           Smorgasbord │   201 │ forwarddiff │      typed_vector │   true │          763.0 │            41.7 │
│           Smorgasbord │   201 │ forwarddiff │    untyped_vector │   true │          797.5 │            37.5 │
│           Smorgasbord │   201 │ reversediff │             typed │   true │          913.1 │            46.0 │
│           Smorgasbord │   201 │    mooncake │             typed │   true │          725.7 │             5.9 │
│           Smorgasbord │   201 │      enzyme │             typed │   true │          901.9 │             3.9 │
│    Loop univariate 1k │  1000 │    mooncake │             typed │   true │         3936.3 │             5.9 │
│       Multivariate 1k │  1000 │    mooncake │             typed │   true │         1014.2 │             8.9 │
│   Loop univariate 10k │ 10000 │    mooncake │             typed │   true │        43379.7 │             5.3 │
│      Multivariate 10k │ 10000 │    mooncake │             typed │   true │         9067.6 │             9.7 │
│               Dynamic │    10 │    mooncake │             typed │   true │          126.0 │            10.6 │
│              Submodel │     1 │    mooncake │             typed │   true │            8.7 │             6.6 │
│                   LDA │    12 │ reversediff │             typed │   true │         1012.2 │             2.0 │
└───────────────────────┴───────┴─────────────┴───────────────────┴────────┴────────────────┴─────────────────┘

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

DynamicPPL.jl documentation for PR #1082 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR1082/

penelopeysm and others added 4 commits November 5, 2025 18:36
* Remove NodeTrait

* Changelog

* Fix exports

* docs

* fix a bug

* Fix doctests

* Fix test

* tweak changelog
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants