Skip to content

Commit

Permalink
now then
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-alt committed Apr 9, 2024
1 parent 642ab2a commit 5c60c4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/pytorch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ if VERSION >= v"1.8"
convergence = conv,
)
using CounterfactualExplanations: counterfactual_probability
@test !CounterfactualExplanations.converged(counterfactual) ||
@test !CounterfactualExplanations.converged(conv, counterfactual) ||
CounterfactualExplanations.target_probs(counterfactual)[1] >=
γ # either not converged or threshold reached
@test !CounterfactualExplanations.converged(counterfactual) ||
@test !CounterfactualExplanations.converged(conv, counterfactual) ||
length(path(counterfactual)) <= max_iter
end

Expand All @@ -157,7 +157,7 @@ if VERSION >= v"1.8"
x′ = CounterfactualExplanations.decode_state(counterfactual)
if counterfactual.generator.latent_space == false
@test isapprox(counterfactual.x, x′; atol = 1e-6)
@test CounterfactualExplanations.converged(counterfactual)
@test CounterfactualExplanations.converged(conv, counterfactual)
@test CounterfactualExplanations.terminated(counterfactual)
end
@test CounterfactualExplanations.total_steps(counterfactual) == 0
Expand Down

0 comments on commit 5c60c4a

Please sign in to comment.