Skip to content

Commit d1a49ce

Browse files
committed
fix jet tests
1 parent cec6887 commit d1a49ce

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

examples/usage.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ display(res_df)
8383
# Plot It
8484
using CairoMakie
8585
f = Figure()
86-
ax = Makie.Axis(f[1, 1]; title = "Result")
86+
ax = Axis(f[1, 1]; title = "Result")
8787
lines!(ax, 0.0f0 .. 1.0f0, x -> pdf(data_dist, x); label = "actual")
8888
lines!(ax, 0.0f0 .. 1.0f0, x -> pdf(d, vcat(x)); label = "estimated")
8989
axislegend(ax)

test/quality_tests/checkby_JET_tests.jl

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Test.@testset "CheckByJET" begin
22
JET.test_package(
33
ContinuousNormalizingFlows;
4-
target_modules = [ContinuousNormalizingFlows],
5-
mode = :typo,
4+
target_modules = (ContinuousNormalizingFlows,),
65
)
76

87
mts = Type{<:ContinuousNormalizingFlows.AbstractICNF}[ContinuousNormalizingFlows.ICNF]
@@ -118,29 +117,37 @@ Test.@testset "CheckByJET" begin
118117

119118
if cond
120119
ContinuousNormalizingFlows.loss(icnf, omode, r, r2, ps, st)
121-
JET.test_call(
122-
ContinuousNormalizingFlows.loss,
123-
Base.typesof(icnf, omode, r, r2, ps, st);
124-
target_modules = [ContinuousNormalizingFlows],
125-
mode = :typo,
120+
JET.@test_call target_modules = (ContinuousNormalizingFlows,) ContinuousNormalizingFlows.loss(
121+
icnf,
122+
omode,
123+
r,
124+
r2,
125+
ps,
126+
st,
126127
)
127-
JET.test_opt(
128-
ContinuousNormalizingFlows.loss,
129-
Base.typesof(icnf, omode, r, r2, ps, st);
130-
target_modules = [ContinuousNormalizingFlows],
128+
JET.@test_opt target_modules = (ContinuousNormalizingFlows,) ContinuousNormalizingFlows.loss(
129+
icnf,
130+
omode,
131+
r,
132+
r2,
133+
ps,
134+
st,
131135
)
132136
else
133137
ContinuousNormalizingFlows.loss(icnf, omode, r, ps, st)
134-
JET.test_call(
135-
ContinuousNormalizingFlows.loss,
136-
Base.typesof(icnf, omode, r, ps, st);
137-
target_modules = [ContinuousNormalizingFlows],
138-
mode = :typo,
138+
JET.@test_call target_modules = (ContinuousNormalizingFlows,) ContinuousNormalizingFlows.loss(
139+
icnf,
140+
omode,
141+
r,
142+
ps,
143+
st,
139144
)
140-
JET.test_opt(
141-
ContinuousNormalizingFlows.loss,
142-
Base.typesof(icnf, omode, r, ps, st);
143-
target_modules = [ContinuousNormalizingFlows],
145+
JET.@test_opt target_modules = (ContinuousNormalizingFlows,) ContinuousNormalizingFlows.loss(
146+
icnf,
147+
omode,
148+
r,
149+
ps,
150+
st,
144151
)
145152
end
146153
end

0 commit comments

Comments
 (0)