Skip to content

Commit a7e17d3

Browse files
committed
Only overload and test waic if defined
1 parent 79ee487 commit a7e17d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ext/InferenceObjectsPosteriorStatsExt/InferenceObjectsPosteriorStatsExt.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ maplayers = isdefined(DimensionalData, :maplayers) ? DimensionalData.maplayers :
1313
include("utils.jl")
1414
include("ci.jl")
1515
include("loo.jl")
16-
include("waic.jl")
16+
@static if isdefined(PosteriorStats, :waic)
17+
include("waic.jl")
18+
end
1719
include("loo_pit.jl")
1820
include("r2_score.jl")
1921
include("summarize.jl")

test/posteriorstats.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ _as_array(x::AbstractArray) = x
172172
end
173173
end
174174

175-
@testset "waic" begin
175+
isdefined(PosteriorStats, :waic) && @testset "waic" begin
176176
@testset for sz in ((1000, 4), (1000, 4, 2), (100, 4, 2, 3))
177177
atol_perm = cbrt(eps())
178178

0 commit comments

Comments
 (0)