You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check handling of convergence criteria in tao_pounders #505
tao_pounders has three gradient based convergence criteria that all have default values. They are processed in the following code snippet:
# Set user defined convergence tests. Beware that specifying multiple tests could# overwrite others or lead to unclear behavior.ifstopping_maxiterisnotNone:
tao.setConvergenceTest(functools.partial(_max_iters, stopping_maxiter))
elifconvergence_gtol_scaledisFalseandconvergence_gtol_absisFalse:
tao.setConvergenceTest(functools.partial(_grtol_conv, convergence_gtol_rel))
elifconvergence_gtol_relisFalseandconvergence_gtol_scaledisFalse:
tao.setConvergenceTest(functools.partial(_gatol_conv, convergence_gtol_abs))
elifconvergence_gtol_scaledisFalse:
tao.setConvergenceTest(
functools.partial(
_grtol_gatol_conv,
convergence_gtol_rel,
convergence_gtol_abs,
)
)
There are two potential problems:
The if conditions don't use is True but just a check for truthyness. This could lead to unexpected behavior.
It seems like by default all of the convergence criteria are active, even though the comment says that this can lead to unexpected behavior.
Activity
janosg commentedon Nov 16, 2026
Fixed in #739