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
"Functions" in this context are calls to methods of the traits CostFunction, Gradient, Hessian, Jacobian, Operator, but also solver-specific ones such as Anneal (Simulated Annealing). Furthermore it includes user-created functions which we do not know about yet.
I think it should be possible to limit the total number of evaluations (all function evaluations summed up), as well as limiting the number of calls to individual functions. Ideally, users can also decide which subset of functions they think should be considered.
To be consistent with how the max_iters limit works, the information which function calls should be limited how, should probably also reside in the state (IterState, PopulationState) and access to them is probably via the State trait. The actual check should probably be performed in Executor after every iteration. However, that may cause the actual number of evaluations to exceed the set limit.
Alternatively it may be possible to include this into the Problem struct, by informing the solver if the limit is exceeded, but I'm afraid that this will cause too much code that is difficult to maintain. If implementing this requires changes to the individual solver implementations, then it is certainly the wrong path.
The text was updated successfully, but these errors were encountered:
@soumyasen1809 sure! However, I'm afraid this will require quite a bit of architectural work which I would like to take a close look at. Unfortunately I'm quite busy lately and my response times are high. You're very welcome to take a shot at this, but it may require some patience on your side as I won't be able to respond very quickly.
"Functions" in this context are calls to methods of the traits
CostFunction
,Gradient
,Hessian
,Jacobian
,Operator
, but also solver-specific ones such asAnneal
(Simulated Annealing). Furthermore it includes user-created functions which we do not know about yet.I think it should be possible to limit the total number of evaluations (all function evaluations summed up), as well as limiting the number of calls to individual functions. Ideally, users can also decide which subset of functions they think should be considered.
To be consistent with how the
max_iters
limit works, the information which function calls should be limited how, should probably also reside in the state (IterState
,PopulationState
) and access to them is probably via theState
trait. The actual check should probably be performed inExecutor
after every iteration. However, that may cause the actual number of evaluations to exceed the set limit.Alternatively it may be possible to include this into the
Problem
struct, by informing the solver if the limit is exceeded, but I'm afraid that this will cause too much code that is difficult to maintain. If implementing this requires changes to the individual solver implementations, then it is certainly the wrong path.The text was updated successfully, but these errors were encountered: