Skip to content

Commit f6fdc91

Browse files
authored
Remove outdated version conditions (#2382)
1 parent d2ea94a commit f6fdc91

File tree

3 files changed

+17
-37
lines changed

3 files changed

+17
-37
lines changed

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ StatsBase = "0.33, 0.34"
7070
StatsFuns = "0.9.5, 1"
7171
TimerOutputs = "0.5"
7272
Zygote = "0.5.4, 0.6"
73-
julia = "1.3"
73+
julia = "1.10"

test/mcmc/Inference.jl

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,14 @@ using Turing
2222
@testset "rng" begin
2323
model = gdemo_default
2424

25-
# multithreaded sampling with PG causes segfaults on Julia 1.5.4
26-
# https://github.com/TuringLang/Turing.jl/issues/1571
27-
samplers = @static if VERSION <= v"1.5.3" || VERSION >= v"1.6.0"
28-
(
29-
HMC(0.1, 7; adtype=adbackend),
30-
PG(10),
31-
IS(),
32-
MH(),
33-
Gibbs(PG(3, :s), HMC(0.4, 8, :m; adtype=adbackend)),
34-
Gibbs(HMC(0.1, 5, :s; adtype=adbackend), ESS(:m)),
35-
)
36-
else
37-
(
38-
HMC(0.1, 7; adtype=adbackend),
39-
IS(),
40-
MH(),
41-
Gibbs(HMC(0.1, 5, :s; adtype=adbackend), ESS(:m)),
42-
)
43-
end
25+
samplers = (
26+
HMC(0.1, 7; adtype=adbackend),
27+
PG(10),
28+
IS(),
29+
MH(),
30+
Gibbs(PG(3, :s), HMC(0.4, 8, :m; adtype=adbackend)),
31+
Gibbs(HMC(0.1, 5, :s; adtype=adbackend), ESS(:m)),
32+
)
4433
for sampler in samplers
4534
Random.seed!(5)
4635
chain1 = sample(model, sampler, MCMCThreads(), 1000, 4)

test/mcmc/abstractmcmc.jl

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,14 @@ end
137137
)
138138

139139
@testset "inference" begin
140-
if adtype isa AutoReverseDiff &&
141-
model.f === DynamicPPL.TestUtils.demo_assume_index_observe &&
142-
VERSION < v"1.8"
143-
# Ref: https://github.com/TuringLang/DynamicPPL.jl/issues/612
144-
@test_throws UndefRefError sample(
145-
model, sampler_ext, 5_000; sample_kwargs...
146-
)
147-
else
148-
DynamicPPL.TestUtils.test_sampler(
149-
[model],
150-
sampler_ext,
151-
5_000;
152-
rtol=0.2,
153-
sampler_name="AdvancedHMC",
154-
sample_kwargs...,
155-
)
156-
end
140+
DynamicPPL.TestUtils.test_sampler(
141+
[model],
142+
sampler_ext,
143+
5_000;
144+
rtol=0.2,
145+
sampler_name="AdvancedHMC",
146+
sample_kwargs...,
147+
)
157148
end
158149
end
159150
end

0 commit comments

Comments
 (0)