Skip to content

Commit e003201

Browse files
committed
Fix misplaced evaluation call without turbo
1 parent 662ed48 commit e003201

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/test_evaluation.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,7 @@ for turbo in [false, true],
6666
true_y = realfnc.(X[1, :], X[2, :], X[3, :])
6767

6868
zero_tolerance = (T == Float16 ? 1e-4 : 1e-6)
69-
try
70-
@test all(abs.(test_y .- true_y) / N .< zero_tolerance)
71-
catch
72-
println("Test for type $T and turbo=$turbo and function $i_func $tree failed.")
73-
mse = sum((x,) -> x^2, test_y .- true_y) / N
74-
mean = sum(test_y) / N
75-
stdev = sqrt(sum((x,) -> x^2, true_y .- mean) / N)
76-
println("Relative error: $(mse / stdev)")
77-
end
69+
@test all(abs.(test_y .- true_y) / N .< zero_tolerance)
7870
end
7971

8072
for turbo in [false, true], T in [Float16, Float32, Float64]
@@ -116,7 +108,7 @@ for turbo in [false, true], T in [Float16, Float32, Float64]
116108
x1 = Node(T; feature=1)
117109
tree = sin(x1 / 0.0)
118110
X = randn(Float32, 3, 10)
119-
@test isnan(tree(X)[1])
111+
@test isnan(tree(X; turbo=turbo)[1])
120112
end
121113

122114
# And, with generic operator enum, this should be an actual error:

0 commit comments

Comments
 (0)