Skip to content

Commit adfdda0

Browse files
committed
Merge remote-tracking branch 'origin/main' into breaking
2 parents d4ef1f2 + cf2ca27 commit adfdda0

29 files changed

+365
-116
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
17-
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs = ["", "docs", "test"])'
17+
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs = ["", "docs", "test", "benchmarks"])'

.github/workflows/DocTest.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# We want to only run doctests on a single version of Julia, because
2+
# things like error messages / output can change between versions and
3+
# is fragile to test against.
4+
name: Doctests
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
merge_group:
12+
types: [checks_requested]
13+
14+
# needed to allow julia-actions/cache to delete old caches that it has created
15+
permissions:
16+
actions: write
17+
contents: read
18+
19+
# Cancel existing tests on the same PR if a new commit is added to a pull request
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
22+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
23+
24+
jobs:
25+
test:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: julia-actions/setup-julia@v2
32+
with:
33+
version: '1'
34+
35+
- uses: julia-actions/cache@v2
36+
37+
- uses: julia-actions/julia-buildpkg@v1
38+
39+
- uses: julia-actions/julia-runtest@v1
40+
env:
41+
GROUP: Doctests

.github/workflows/Docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
permissions:
1919
contents: write
20-
pull-requests: read
20+
pull-requests: write
2121

2222
jobs:
2323
docs:

.github/workflows/JuliaPre.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ permissions:
1414
jobs:
1515
test:
1616
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
test_group:
22+
- Group1
23+
- Group2
24+
1725
steps:
1826
- uses: actions/checkout@v4
1927
- uses: julia-actions/setup-julia@v2
@@ -22,3 +30,5 @@ jobs:
2230
- uses: julia-actions/cache@v2
2331
- uses: julia-actions/julia-buildpkg@v1
2432
- uses: julia-actions/julia-runtest@v1
33+
env:
34+
GROUP: ${{ matrix.test_group }}

HISTORY.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,56 @@ This release overhauls how VarInfo objects track variables such as the log joint
1818
- `getlogp` now returns a `NamedTuple` with keys `logprior` and `loglikelihood`. If you want the log joint probability, which is what `getlogp` used to return, use `getlogjoint`.
1919
- Correspondingly `setlogp!!` and `acclogp!!` should now be called with a `NamedTuple` with keys `logprior` and `loglikelihood`. The `acclogp!!` method with a single scalar value has been deprecated and falls back on `accloglikelihood!!`, and the single scalar version of `setlogp!!` has been removed. Corresponding setter/accumulator functions exist for the log prior as well.
2020

21+
## 0.36.11
22+
23+
Make `ThreadSafeVarInfo` hold a total of `Threads.nthreads() * 2` logp values, instead of just `Threads.nthreads()`.
24+
This fix helps to paper over the cracks in using `threadid()` to index into the `ThreadSafeVarInfo` object.
25+
26+
## 0.36.10
27+
28+
Added compatibility with ForwardDiff 1.0.
29+
30+
## 0.36.9
31+
32+
Fixed a failure when sampling from `ProductNamedTupleDistribution` due to
33+
missing `tovec` methods for `NamedTuple` and `Tuple`.
34+
35+
## 0.36.8
36+
37+
Made `LogDensityFunction` a subtype of `AbstractMCMC.AbstractModel`.
38+
39+
## 0.36.7
40+
41+
Added compatibility with MCMCChains 7.0.
42+
43+
## 0.36.6
44+
45+
`DynamicPPL.TestUtils.run_ad` now takes an extra `context` keyword argument, which is passed to the `LogDensityFunction` constructor.
46+
47+
## 0.36.5
48+
49+
`varinfo[:]` now returns an empty vector if `varinfo::DynamicPPL.NTVarInfo` is empty, rather than erroring.
50+
51+
In its place, `check_model` now issues a warning if the model is empty.
52+
53+
## 0.36.4
54+
55+
Added compatibility with DifferentiationInterface.jl 0.7, and also with JET.jl 0.10.
56+
57+
The JET compatibility entry should only affect you if you are using DynamicPPL on the Julia 1.12 pre-release.
58+
59+
## 0.36.3
60+
61+
Moved the `bijector(model)`, where `model` is a `DynamicPPL.Model`, function from the Turing main repo.
62+
63+
## 0.36.2
64+
65+
Improved docstrings for AD testing utilities.
66+
67+
## 0.36.1
68+
69+
Fixed a missing method for `tilde_assume`.
70+
2171
## 0.36.0
2272

2373
**Breaking changes**

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ ChainRulesCore = "1"
5555
Chairmarks = "1.3.1"
5656
Compat = "4"
5757
ConstructionBase = "1.5.4"
58-
DifferentiationInterface = "0.6.41"
58+
DifferentiationInterface = "0.6.41, 0.7"
5959
Distributions = "0.25"
6060
DocStringExtensions = "0.9"
6161
EnzymeCore = "0.6 - 0.8"
62-
ForwardDiff = "0.10.12"
62+
ForwardDiff = "0.10.12, 1"
6363
InteractiveUtils = "1"
64-
JET = "0.9"
64+
JET = "0.9, 0.10"
6565
KernelAbstractions = "0.9.33"
6666
LinearAlgebra = "1.6"
6767
LogDensityProblems = "2"
68-
MCMCChains = "6"
68+
MCMCChains = "6, 7"
6969
MacroTools = "0.5.6"
7070
Mooncake = "0.4.95"
7171
OrderedCollections = "1"

benchmarks/Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
1919
ADTypes = "1.14.0"
2020
BenchmarkTools = "1.6.0"
2121
Distributions = "0.25.117"
22-
ForwardDiff = "0.10.38"
22+
DynamicPPL = "0.36"
23+
ForwardDiff = "0.10.38, 1"
2324
LogDensityProblems = "2.1.2"
25+
Mooncake = "0.4"
2426
PrettyTables = "2.4.0"
2527
ReverseDiff = "1.15.3"
28+
StableRNGs = "1"

benchmarks/src/DynamicPPLBenchmarks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Return the dimension of `model`, accounting for linking, if any.
2323
"""
2424
function model_dimension(model, islinked)
2525
vi = VarInfo()
26-
model(vi)
26+
model(StableRNG(23), vi)
2727
if islinked
2828
vi = DynamicPPL.link(vi, model)
2929
end

docs/Project.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
1414
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
1515

1616
[compat]
17+
AbstractPPL = "0.11"
1718
Accessors = "0.1"
1819
DataStructures = "0.18"
1920
Distributions = "0.25"
2021
Documenter = "1"
2122
DocumenterMermaid = "0.1, 0.2"
23+
DynamicPPL = "0.36"
2224
FillArrays = "0.13, 1"
23-
ForwardDiff = "0.10"
24-
JET = "0.9"
25+
ForwardDiff = "0.10, 1"
26+
JET = "0.9, 0.10"
2527
LogDensityProblems = "2"
26-
MCMCChains = "5, 6"
28+
MCMCChains = "5, 6, 7"
2729
StableRNGs = "1"

src/DynamicPPL.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ include("logdensityfunction.jl")
191191
include("model_utils.jl")
192192
include("extract_priors.jl")
193193
include("values_as_in_model.jl")
194+
include("bijector.jl")
194195

195196
include("debug_utils.jl")
196197
using .DebugUtils

0 commit comments

Comments
 (0)