Skip to content

Commit 855414f

Browse files
committed
warning should warn also when k < 0
1 parent 6e0a8e0 commit 855414f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/plans/debug.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,6 @@ end
10111011
function (d::DebugWarnIfCostIncreases)(
10121012
p::AbstractManoptProblem, st::AbstractManoptSolverState, k::Int
10131013
)
1014-
(k < 0) && (return nothing)
10151014
if d.status !== :No
10161015
cost = get_cost(p, get_iterate(st))
10171016
if cost > d.old_cost + d.tol
@@ -1062,7 +1061,6 @@ end
10621061
function (d::DebugWarnIfCostNotFinite)(
10631062
p::AbstractManoptProblem, st::AbstractManoptSolverState, k::Int
10641063
)
1065-
(k < 0) && (return nothing)
10661064
if d.status !== :No
10671065
cost = get_cost(p, get_iterate(st))
10681066
if !isfinite(cost)
@@ -1109,7 +1107,6 @@ end
11091107
function (d::DebugWarnIfFieldNotFinite)(
11101108
::AbstractManoptProblem, st::AbstractManoptSolverState, k::Int
11111109
)
1112-
(k < 0) && (return nothing)
11131110
if d.status !== :No
11141111
if d.field == :Iterate
11151112
v = get_iterate(st)
@@ -1169,7 +1166,6 @@ end
11691166
function (d::DebugWarnIfGradientNormTooLarge)(
11701167
mp::AbstractManoptProblem, st::AbstractManoptSolverState, k::Int
11711168
)
1172-
(k < 0) && (return nothing)
11731169
if d.status !== :No
11741170
M = get_manifold(mp)
11751171
p = get_iterate(st)
@@ -1222,7 +1218,7 @@ end
12221218
function (d::DebugWarnIfStepsizeCollapsed)(
12231219
amp::AbstractManoptProblem, st::AbstractManoptSolverState, k::Int
12241220
)
1225-
(k < 1) && (return nothing)
1221+
(k == 0) && (return nothing)
12261222
if d.status !== :No
12271223
if get_last_stepsize(amp, st, k) d.stop_when_stepsize_less
12281224
@warn "Backtracking stopped because the stepsize fell below the threshold $(d.stop_when_stepsize_less)."

0 commit comments

Comments
 (0)