Skip to content

Commit 2707d12

Browse files
penelopeysmyebaigithub-actions[bot]
authored
Update for proposed DynamicPPL 0.32 (#2419)
* Add DynamicPPL integration tests * Bump DynamicPPL compat -> 0.32 * Remove / export deprecated functions as needed Including @SubModel, to_submodel, link!, invlink! * Update submodel names as per DPPL 0.32 * Enable concurrency on PR testing to avoid wastage * Bump Turing patch version * Improve descriptions of tests Co-authored-by: Hong Ge <[email protected]> * Update test/dynamicppl/compiler.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Hong Ge <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 700a19a commit 2707d12

File tree

11 files changed

+398
-16
lines changed

11 files changed

+398
-16
lines changed

.github/workflows/Tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
- master
77
pull_request:
88

9+
# Cancel existing tests on the same PR if a new commit is added to a pull request
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
914
jobs:
1015
test:
1116
# Use matrix.test.name here to avoid it taking up the entire window width

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Turing"
22
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
3-
version = "0.35.4"
3+
version = "0.35.5"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -63,7 +63,7 @@ Distributions = "0.23.3, 0.24, 0.25"
6363
DistributionsAD = "0.6"
6464
DocStringExtensions = "0.8, 0.9"
6565
DynamicHMC = "3.4"
66-
DynamicPPL = "0.29, 0.30.4, 0.31"
66+
DynamicPPL = "0.32"
6767
EllipticalSliceSampling = "0.5, 1, 2"
6868
ForwardDiff = "0.10.3"
6969
Libtask = "0.8.8"

docs/src/api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ even though [`Prior()`](@ref) is actually defined in the `Turing.Inference` modu
3737

3838
### Modelling
3939

40-
| Exported symbol | Documentation | Description |
41-
|:--------------- |:--------------------------------- |:-------------------------------------------- |
42-
| `@model` | [`DynamicPPL.@model`](@extref) | Define a probabilistic model |
43-
| `@varname` | [`AbstractPPL.@varname`](@extref) | Generate a `VarName` from a Julia expression |
44-
| `@submodel` | [`DynamicPPL.@submodel`](@extref) | Define a submodel |
40+
| Exported symbol | Documentation | Description |
41+
|:--------------- |:----------------------------------- |:-------------------------------------------- |
42+
| `@model` | [`DynamicPPL.@model`](@extref) | Define a probabilistic model |
43+
| `@varname` | [`AbstractPPL.@varname`](@extref) | Generate a `VarName` from a Julia expression |
44+
| `to_submodel` | [`DynamicPPL.to_submodel`](@extref) | Define a submodel |
4545

4646
### Inference
4747

src/Turing.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,17 @@ using DynamicPPL:
7171
decondition,
7272
fix,
7373
unfix,
74-
conditioned
74+
conditioned,
75+
to_submodel
7576
using StatsBase: predict
7677
using Bijectors: ordered
7778
using OrderedCollections: OrderedDict
7879

7980
# Turing essentials - modelling macros and inference algorithms
8081
export @model, # modelling
8182
@varname,
82-
@submodel,
83+
@submodel, # Deprecated
84+
to_submodel,
8385
DynamicPPL,
8486
Prior, # Sampling from the prior
8587
MH, # classic sampling

src/mcmc/Inference.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ using DynamicPPL:
66
VarInfo,
77
TypedVarInfo,
88
islinked,
9-
invlink!,
10-
link!,
119
setindex!!,
1210
push!!,
1311
setlogp!!,

test/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
[deps]
22
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
3+
AbstractPPL = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf"
34
AdvancedMH = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
45
AdvancedPS = "576499cb-2369-40b2-a588-c64705576edc"
56
AdvancedVI = "b5ca4192-6429-45e5-a2d9-87aec30a685c"
67
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
8+
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
79
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
810
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
911
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
@@ -45,7 +47,7 @@ Clustering = "0.14, 0.15"
4547
Distributions = "0.25"
4648
DistributionsAD = "0.6.3"
4749
DynamicHMC = "2.1.6, 3.0"
48-
DynamicPPL = "0.29, 0.30.4, 0.31"
50+
DynamicPPL = "0.32.2"
4951
FiniteDifferences = "0.10.8, 0.11, 0.12"
5052
ForwardDiff = "0.10.12 - 0.10.32, 0.10"
5153
HypothesisTests = "0.11"

0 commit comments

Comments
 (0)