Skip to content

Commit 2a1b650

Browse files
authored
ForwardDiff -> 1 (#871)
* Bump ForwardDiff=1 * Remove compat/ad.jl * Bump benchmarks compat too * Add CompatHelper to benchmarks folder
1 parent bb0c857 commit 2a1b650

File tree

9 files changed

+10
-61
lines changed

9 files changed

+10
-61
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"])'

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# DynamicPPL Changelog
22

3+
## 0.36.10
4+
5+
Added compatibility with ForwardDiff 1.0.
6+
37
## 0.36.9
48

59
Fixed a failure when sampling from `ProductNamedTupleDistribution` due to

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.36.9"
3+
version = "0.36.10"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -58,7 +58,7 @@ DifferentiationInterface = "0.6.41, 0.7"
5858
Distributions = "0.25"
5959
DocStringExtensions = "0.9"
6060
EnzymeCore = "0.6 - 0.8"
61-
ForwardDiff = "0.10.12"
61+
ForwardDiff = "0.10.12, 1"
6262
InteractiveUtils = "1"
6363
JET = "0.9, 0.10"
6464
KernelAbstractions = "0.9.33"

benchmarks/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ 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+
ForwardDiff = "0.10.38, 1"
2323
LogDensityProblems = "2.1.2"
2424
PrettyTables = "2.4.0"
2525
ReverseDiff = "1.15.3"

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Documenter = "1"
2222
DocumenterMermaid = "0.1, 0.2"
2323
DynamicPPL = "0.36"
2424
FillArrays = "0.13, 1"
25-
ForwardDiff = "0.10"
25+
ForwardDiff = "0.10, 1"
2626
JET = "0.9, 0.10"
2727
LogDensityProblems = "2"
2828
MCMCChains = "5, 6, 7"

test/Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
66
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
77
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
88
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
9-
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
109
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1110
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1211
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
@@ -36,13 +35,12 @@ Accessors = "0.1"
3635
Aqua = "0.8"
3736
Bijectors = "0.15.1"
3837
Combinatorics = "1"
39-
Compat = "4.3.0"
4038
DifferentiationInterface = "0.6.41, 0.7"
4139
Distributions = "0.25"
4240
DistributionsAD = "0.6.3"
4341
Documenter = "1"
4442
EnzymeCore = "0.6 - 0.8"
45-
ForwardDiff = "0.10.12"
43+
ForwardDiff = "0.10.12, 1"
4644
JET = "0.9, 0.10"
4745
LogDensityProblems = "2"
4846
MCMCChains = "6.0.4, 7"

test/compat/ad.jl

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/runtests.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ using MCMCChains
1515
using StableRNGs
1616
using ReverseDiff
1717
using Zygote
18-
using Compat
1918

2019
using Distributed
2120
using LinearAlgebra
@@ -79,9 +78,6 @@ include("test_util.jl")
7978
end
8079

8180
if GROUP == "All" || GROUP == "Group2"
82-
@testset "compat" begin
83-
include(joinpath("compat", "ad.jl"))
84-
end
8581
@testset "extensions" begin
8682
include("ext/DynamicPPLMCMCChainsExt.jl")
8783
include("ext/DynamicPPLJETExt.jl")

test/test_util.jl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@
88
end
99
const gdemo_default = gdemo_d()
1010

11-
# TODO(penelopeysm): Remove this (and also test/compat/ad.jl)
12-
function test_model_ad(model, logp_manual)
13-
vi = VarInfo(model)
14-
x = vi[:]
15-
16-
# Log probabilities using the model.
17-
= DynamicPPL.LogDensityFunction(model, vi)
18-
logp_model = Base.Fix1(LogDensityProblems.logdensity, ℓ)
19-
20-
# Check that both functions return the same values.
21-
lp = logp_manual(x)
22-
@test logp_model(x) lp
23-
24-
# Gradients based on the manual implementation.
25-
grad = ForwardDiff.gradient(logp_manual, x)
26-
27-
# Gradients based on the model.
28-
@test ForwardDiff.gradient(logp_model, x) grad
29-
end
30-
3111
"""
3212
short_varinfo_name(vi::AbstractVarInfo)
3313

0 commit comments

Comments
 (0)