ISTA/FISTA step_size property could unintendedly increment the step size
These lines could increment the step size when you call it. For something like a decreasing step size that decreases each time it is called, this could be a problem.
https://github.com/TomographicImaging/CIL/blob/3230c7599ab40839098d1deebbd5c444f67f7d69/Wrappers/Python/cil/optimisation/algorithms/FISTA.py#L115-L123
@gfardell suggested that the algorithm could just have self._step_size as a value that is only updated when self._step_size = self.step_size_rule.get_step_size(self) is called in the update. This would let people have access to the step size for the iteration in callbacks as well.
Perhaps then the getter could be something like...
@property
def step_size(self):
if isinstance(self.step_size_rule, ConstantStepSize):
return self.step_size_rule.step_size
else:
try:
return self._step_size
except NameError:
return NotImplementedError("Note the step-size is set by a step-size rule and could change with each iteration. After running one update step, a step-size will be returned"))
In GD we just chicken out if it isn't a constant step-size: https://github.com/TomographicImaging/CIL/blob/3230c7599ab40839098d1deebbd5c444f67f7d69/Wrappers/Python/cil/optimisation/algorithms/GD.py#L138-L144
We should probably be consistent