Closed jClugstor closed 5 months ago
It should be available from the iter
field of the OptimizationState https://docs.sciml.ai/Optimization/stable/API/optimization_state/#optstate which is the first argument to the callback
For the number of calls to the loss function, the .original
filed would be useful? The number of iterations would be a lower bound on that number.
Yeah, that's used to populate the fevals
field in https://docs.sciml.ai/Optimization/stable/API/optimization_stats/ for some solvers if they return it. We might switch to an Optimization.jl native counter if it makes sense later.
Did the first argument to the callback recently change to be an OptimizationState?
I see, https://github.com/SciML/Optimization.jl/pull/649 did it, I think that solves it then, thanks!
Is there a way that I could get the current iteration of the optimization inside of a callback. I would like to be able to access the number of times the loss function has been called from inside of the callback function.