Skip to content

Commit 4a13495

Browse files
github-actions[bot]CompatHelper Juliastoropoli
authored
CompatHelper: bump compat for Turing to 0.30, (keep existing compat) (#99)
* CompatHelper: bump compat for Turing to 0.30, (keep existing compat) * fix: adbackends with Turing 0.30 --------- Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: Jose Storopoli <[email protected]>
1 parent a4eab6f commit 4a13495

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ StatsBase = "0.33, 0.34"
2929
StatsModels = "0.6.28, 0.7"
3030
TableOperations = "1.2"
3131
Tables = "1.6"
32-
Turing = "0.20 - 0.27, 0.28, 0.29"
32+
Turing = "0.20 - 0.27, 0.28, 0.29, 0.30"
3333
julia = "1"

test/ad_backends.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,24 @@
55
m = turing_model(f, cheese)
66
# only running 2 samples to test if the different ADs runs
77
@timed_testset "ForwardDiff" begin
8-
Turing.setadbackend(:forwarddiff)
9-
chn = sample(m, NUTS(), 2)
8+
chn = sample(m, NUTS(; adtype=AutoForwardDiff(; chunksize=8)), 2)
109
@test chn isa Chains
1110
end
1211
# TODO: fix Tracker tests
1312
# @timed_testset "Tracker" begin
1413
# using Tracker
15-
# Turing.setadbackend(:tracker)
16-
# chn = sample(m, NUTS(), 2)
14+
# chn = sample(m, NUTS(; adtype=AutoTracker()), 2)
1715
# @test chn isa Chains
1816
# end
1917
# TODO: fix Zygote tests
2018
# @timed_testset "Zygote" begin
2119
# using Zygote
22-
# Turing.setadbackend(:zygote)
23-
# chn = sample(m, NUTS(), 2)
20+
# chn = sample(m, NUTS(; adtype=AutoZygote()), 2)
2421
# @test chn isa Chains
2522
# end
2623
@timed_testset "ReverseDiff" begin
2724
using ReverseDiff
28-
Turing.setadbackend(:reversediff)
29-
chn = sample(m, NUTS(), 2)
25+
chn = sample(m, NUTS(; adtype=AutoReverseDiff(; compile=true)), 2)
3026
@test chn isa Chains
3127
end
32-
# go back to defaults
33-
Turing.setadbackend(:forwarddiff)
3428
end

0 commit comments

Comments
 (0)