Skip to content

Commit dd9db91

Browse files
committed
fix testset let
1 parent 05367c1 commit dd9db91

4 files changed

Lines changed: 53 additions & 53 deletions

File tree

‎test/ci_tests/regression_tests.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Test.@testset verbose = true showtiming = true failfast = false "Regression Tests" begin
2-
Test.@testset let ndata = 2^10, ndimensions = 1, α = 2, β = 4
1+
Test.@testset let ndata = 2^10, ndimensions = 1, α = 2, β = 4
2+
Test.@testset verbose = true showtiming = true failfast = false "Regression Tests" begin
33
data_dist = Distributions.Beta{Float32}(convert(Float32, α), convert(Float32, β))
44
r = rand(data_dist, ndimensions, ndata)
55
r = convert.(Float32, r)

‎test/ci_tests/smoke_tests.jl‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" begin
2-
Test.@testset verbose = true showtiming = true failfast = false "$device | $compute_mode | $omode | inplace = $inplace | conditioned = $conditioned | planar = $planar" for device in
3-
devices,
4-
compute_mode in compute_modes,
5-
omode in omodes,
6-
inplace in inplaces,
7-
conditioned in conditioneds,
8-
planar in planars
9-
10-
Test.@testset let ndata = 4, ndimensions = 2, α = 2, β = 4
1+
Test.@testset let ndata = 4, ndimensions = 2, α = 2, β = 4
2+
Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" begin
3+
Test.@testset verbose = true showtiming = true failfast = false "$device | $compute_mode | $omode | inplace = $inplace | conditioned = $conditioned | planar = $planar" for device in
4+
devices,
5+
compute_mode in compute_modes,
6+
omode in omodes,
7+
inplace in inplaces,
8+
conditioned in conditioneds,
9+
planar in planars
10+
1111
data_dist =
1212
Distributions.Beta{Float32}(convert(Float32, α), convert(Float32, β))
1313
data_dist2 =
@@ -30,7 +30,7 @@ Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" be
3030
icnf = ifelse(
3131
planar,
3232
ContinuousNormalizingFlows.ICNF(;
33-
nn = ifelse(
33+
nn=ifelse(
3434
conditioned,
3535
Lux.Chain(
3636
ContinuousNormalizingFlows.PlanarLayer(
@@ -46,14 +46,14 @@ Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" be
4646
),
4747
),
4848
nvariables,
49-
nconditions = ifelse(conditioned, nvariables, 0),
49+
nconditions=ifelse(conditioned, nvariables, 0),
5050
inplace,
5151
compute_mode,
5252
device,
5353
),
5454
ContinuousNormalizingFlows.ICNF(;
5555
nvariables,
56-
nconditions = ifelse(conditioned, nvariables, 0),
56+
nconditions=ifelse(conditioned, nvariables, 0),
5757
inplace,
5858
compute_mode,
5959
device,
@@ -130,7 +130,7 @@ Test.@testset verbose = true showtiming = true failfast = false "Smoke Tests" be
130130
Test.@test !isnothing(rand(d, ndata))
131131

132132
Test.@testset verbose = true showtiming = true failfast = false "$adtype on loss" for adtype in
133-
adtypes
133+
adtypes
134134

135135
Test.@test !isnothing(
136136
DifferentiationInterface.gradient(diff_loss, adtype, ps),

‎test/quality_tests/checkby_JET_tests.jl‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Test.@testset verbose = true showtiming = true failfast = false "CheckByJET" begin
2-
JET.test_package(
3-
ContinuousNormalizingFlows;
4-
target_modules = (ContinuousNormalizingFlows,),
5-
)
6-
Test.@testset verbose = true showtiming = true failfast = false "$device | $compute_mode | $omode | inplace = $inplace | conditioned = $conditioned | planar = $planar" for device in
7-
devices,
8-
compute_mode in compute_modes,
9-
omode in omodes,
10-
inplace in inplaces,
11-
conditioned in conditioneds,
12-
planar in planars
1+
Test.@testset let ndata = 4, ndimensions = 2, α = 2, β = 4
2+
Test.@testset verbose = true showtiming = true failfast = false "CheckByJET" begin
3+
JET.test_package(
4+
ContinuousNormalizingFlows;
5+
target_modules=(ContinuousNormalizingFlows,),
6+
)
7+
Test.@testset verbose = true showtiming = true failfast = false "$device | $compute_mode | $omode | inplace = $inplace | conditioned = $conditioned | planar = $planar" for device in
8+
devices,
9+
compute_mode in compute_modes,
10+
omode in omodes,
11+
inplace in inplaces,
12+
conditioned in conditioneds,
13+
planar in planars
1314

14-
Test.@testset let ndata = 4, ndimensions = 2, α = 2, β = 4
1515
data_dist =
1616
Distributions.Beta{Float32}(convert(Float32, α), convert(Float32, β))
1717
data_dist2 =
@@ -32,7 +32,7 @@ Test.@testset verbose = true showtiming = true failfast = false "CheckByJET" beg
3232
icnf = ifelse(
3333
planar,
3434
ContinuousNormalizingFlows.ICNF(;
35-
nn = ifelse(
35+
nn=ifelse(
3636
conditioned,
3737
Lux.Chain(
3838
ContinuousNormalizingFlows.PlanarLayer(
@@ -48,14 +48,14 @@ Test.@testset verbose = true showtiming = true failfast = false "CheckByJET" beg
4848
),
4949
),
5050
nvariables,
51-
nconditions = ifelse(conditioned, nvariables, 0),
51+
nconditions=ifelse(conditioned, nvariables, 0),
5252
inplace,
5353
compute_mode,
5454
device,
5555
),
5656
ContinuousNormalizingFlows.ICNF(;
5757
nvariables,
58-
nconditions = ifelse(conditioned, nvariables, 0),
58+
nconditions=ifelse(conditioned, nvariables, 0),
5959
inplace,
6060
compute_mode,
6161
device,
@@ -73,24 +73,24 @@ Test.@testset verbose = true showtiming = true failfast = false "CheckByJET" beg
7373
JET.test_call(
7474
ContinuousNormalizingFlows.loss,
7575
typeof((icnf, omode, r, r2, ps, st));
76-
target_modules = (ContinuousNormalizingFlows,),
76+
target_modules=(ContinuousNormalizingFlows,),
7777
)
7878
JET.test_opt(
7979
ContinuousNormalizingFlows.loss,
8080
typeof((icnf, omode, r, r2, ps, st));
81-
target_modules = (ContinuousNormalizingFlows,),
81+
target_modules=(ContinuousNormalizingFlows,),
8282
)
8383
else
8484
ContinuousNormalizingFlows.loss(icnf, omode, r, ps, st)
8585
JET.test_call(
8686
ContinuousNormalizingFlows.loss,
8787
typeof((icnf, omode, r, ps, st));
88-
target_modules = (ContinuousNormalizingFlows,),
88+
target_modules=(ContinuousNormalizingFlows,),
8989
)
9090
JET.test_opt(
9191
ContinuousNormalizingFlows.loss,
9292
typeof((icnf, omode, r, ps, st));
93-
target_modules = (ContinuousNormalizingFlows,),
93+
target_modules=(ContinuousNormalizingFlows,),
9494
)
9595
end
9696
end

‎test/runtests.jl‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ if VIA_ENZYME
6969
adtypes,
7070
ADTypes.AbstractADType[
7171
ADTypes.AutoEnzyme(;
72-
mode = Enzyme.set_runtime_activity(Enzyme.Reverse),
73-
function_annotation = Enzyme.Const,
72+
mode=Enzyme.set_runtime_activity(Enzyme.Reverse),
73+
function_annotation=Enzyme.Const,
7474
),
7575
ADTypes.AutoEnzyme(;
76-
mode = Enzyme.set_runtime_activity(Enzyme.Forward),
77-
function_annotation = Enzyme.Const,
76+
mode=Enzyme.set_runtime_activity(Enzyme.Forward),
77+
function_annotation=Enzyme.Const,
7878
),
7979
],
8080
)
@@ -83,45 +83,45 @@ if VIA_ENZYME
8383
ContinuousNormalizingFlows.ComputeMode[
8484
ContinuousNormalizingFlows.LuxVecJacMatrixMode(
8585
ADTypes.AutoEnzyme(;
86-
mode = Enzyme.set_runtime_activity(Enzyme.Reverse),
87-
function_annotation = Enzyme.Const,
86+
mode=Enzyme.set_runtime_activity(Enzyme.Reverse),
87+
function_annotation=Enzyme.Const,
8888
),
8989
),
9090
ContinuousNormalizingFlows.DIVecJacMatrixMode(
9191
ADTypes.AutoEnzyme(;
92-
mode = Enzyme.set_runtime_activity(Enzyme.Reverse),
93-
function_annotation = Enzyme.Const,
92+
mode=Enzyme.set_runtime_activity(Enzyme.Reverse),
93+
function_annotation=Enzyme.Const,
9494
),
9595
),
9696
ContinuousNormalizingFlows.DIVecJacVectorMode(
9797
ADTypes.AutoEnzyme(;
98-
mode = Enzyme.set_runtime_activity(Enzyme.Reverse),
99-
function_annotation = Enzyme.Const,
98+
mode=Enzyme.set_runtime_activity(Enzyme.Reverse),
99+
function_annotation=Enzyme.Const,
100100
),
101101
),
102102
ContinuousNormalizingFlows.LuxJacVecMatrixMode(
103103
ADTypes.AutoEnzyme(;
104-
mode = Enzyme.set_runtime_activity(Enzyme.Forward),
105-
function_annotation = Enzyme.Const,
104+
mode=Enzyme.set_runtime_activity(Enzyme.Forward),
105+
function_annotation=Enzyme.Const,
106106
),
107107
),
108108
ContinuousNormalizingFlows.DIJacVecMatrixMode(
109109
ADTypes.AutoEnzyme(;
110-
mode = Enzyme.set_runtime_activity(Enzyme.Forward),
111-
function_annotation = Enzyme.Const,
110+
mode=Enzyme.set_runtime_activity(Enzyme.Forward),
111+
function_annotation=Enzyme.Const,
112112
),
113113
),
114114
ContinuousNormalizingFlows.DIJacVecVectorMode(
115115
ADTypes.AutoEnzyme(;
116-
mode = Enzyme.set_runtime_activity(Enzyme.Forward),
117-
function_annotation = Enzyme.Const,
116+
mode=Enzyme.set_runtime_activity(Enzyme.Forward),
117+
function_annotation=Enzyme.Const,
118118
),
119119
),
120120
],
121121
)
122122
end
123123

124-
Test.@testset verbose = true showtiming = true failfast = false "Overall" begin
124+
Test.@testset "Overall" begin
125125
if GROUP == "All" || GROUP in ["SmokeXOut", "SmokeXIn", "SmokeXYOut", "SmokeXYIn"]
126126
include("ci_tests/smoke_tests.jl")
127127
end

0 commit comments

Comments
 (0)