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
GD raises a deprecation warning if atol or rtol are passed and are !=0. But the default value if they're not passed is None so the deprecation warning is also raised if the arguments are not used at all.
self.rtol=kwargs.pop('rtol', None) # to be deprecated (released in 25.0)
self.atol=kwargs.pop('atol', None) # to be deprecated (released in 25.0)
ifkwargs.get('objective_function') isnotNone: # to be deprecated
warn('The argument `objective_function` will be deprecated in the future. Please use `f` instead.', DeprecationWarning, stacklevel=2)
iffisnotNone:
raiseValueError('The argument `objective_function` is being deprecated, replaced by `f`. Please use just `f` not both')
f=kwargs.pop('objective_function')
ifself.alphaisnotNoneorself.betaisnotNone: # to be deprecated
warn('To modify the parameters for the Armijo rule please use `step_size_rule=ArmijoStepSizeRule(alpha, beta, kmax)`. The arguments `alpha` and `beta` will be deprecated. ', DeprecationWarning, stacklevel=2)
ifself.rtol!=0orself.atol!=0: # to be deprecated (released in 25.0)
warn('`rtol` and `atol` are deprecated. For early stopping, please use a callback (cil.optimisation.utilities.callbacks), for example `EarlyStoppingObjectiveValue`.', DeprecationWarning, stacklevel=2)
else:
log.warn('Breaking backwards compatibility, GD no longer automatically stops if the objective function is close to zero. For this functionality, please use a callback (cil.optimisation.utilities.callbacks).' )
Description
GD raises a deprecation warning if
atol
orrtol
are passed and are !=0. But the default value if they're not passed is None so the deprecation warning is also raised if the arguments are not used at all.CIL/Wrappers/Python/cil/optimisation/algorithms/GD.py
Lines 50 to 67 in a14ac33
Environment
24.3.0 None 3.12.8 | packaged by conda-forge | (main, Dec 5 2024, 14:24:40) [GCC 13.3.0] linux
The text was updated successfully, but these errors were encountered: