Skip to content

Commit 2837d6e

Browse files
committed
Don't test Mooncake on 1.12
1 parent cdeb657 commit 2837d6e

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

test/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1919
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
2020
MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
2121
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
22-
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
2322
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
2423
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2524
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

test/ad.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ using DynamicPPL: LogDensityFunction
33
@testset "Automatic differentiation" begin
44
# Used as the ground truth that others are compared against.
55
ref_adtype = AutoForwardDiff()
6-
test_adtypes = [
7-
AutoReverseDiff(; compile=false),
8-
AutoReverseDiff(; compile=true),
9-
AutoMooncake(; config=nothing),
10-
]
6+
test_adtypes = [AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)]
7+
8+
if USE_MOONCAKE
9+
push!(test_adtypes, AutoMooncake(; config=nothing))
10+
end
1111

1212
@testset "Unsupported backends" begin
1313
@model demo() = x ~ Normal()
@@ -16,7 +16,7 @@ using DynamicPPL: LogDensityFunction
1616
)
1717
end
1818

19-
@testset "Correctness: ForwardDiff, ReverseDiff, and Mooncake" begin
19+
@testset "Correctness" begin
2020
@testset "$(m.f)" for m in DynamicPPL.TestUtils.DEMO_MODELS
2121
rand_param_values = DynamicPPL.TestUtils.rand_prior_true(m)
2222
vns = DynamicPPL.TestUtils.varnames(m)

test/runtests.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Random.seed!(100)
4040

4141
include("test_util.jl")
4242

43+
# Don't attempt to import Mooncake on 1.12
44+
USE_MOONCAKE = VERSION >= v"1.12"
45+
46+
if USE_MOONCAKE
47+
Pkg.add("Mooncake")
48+
end
49+
4350
@testset verbose = true "DynamicPPL.jl" begin
4451
# The tests are split into two groups so that CI can run in parallel. The
4552
# groups are chosen to make both groups take roughly the same amount of
@@ -80,7 +87,9 @@ include("test_util.jl")
8087
end
8188
@testset "ad" begin
8289
include("ext/DynamicPPLForwardDiffExt.jl")
83-
include("ext/DynamicPPLMooncakeExt.jl")
90+
if USE_MOONCAKE
91+
include("ext/DynamicPPLMooncakeExt.jl")
92+
end
8493
include("ad.jl")
8594
end
8695
@testset "prob and logprob macro" begin

0 commit comments

Comments
 (0)