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
Fixes#907 - Added iteration tracking to LBFGS callbacks so that
OptimizationState.iter properly increments during optimization.
Previously, the iteration counter was always 0 in callbacks because
the LBFGS solver wasn't tracking iterations. Now uses a Ref counter
that increments with each function evaluation.
Changes:
- Added iter_count = Ref(0) before _loss function definition
- Increment iter_count[] in _loss function
- Pass iter_count[] to OptimizationState constructor
- Applied fix to both constrained and unconstrained cases
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments