Skip to content

refactor line-search solvers to return latest iterate#227

Open
jpbrodrick89 wants to merge 2 commits intopatrick-kidger:devfrom
jpbrodrick89:jpb/refactor-y-eval
Open

refactor line-search solvers to return latest iterate#227
jpbrodrick89 wants to merge 2 commits intopatrick-kidger:devfrom
jpbrodrick89:jpb/refactor-y-eval

Conversation

@jpbrodrick89
Copy link
Copy Markdown

@jpbrodrick89 jpbrodrick89 commented Apr 9, 2026

As suggested in your comment in #225, I have refactored line-search solvers, specifically AbstractGradientDescent, AbstractQuasiNewton and AbstractGaussNewton (and their subclasses implicitly), such that step always receives and returns the latest iterate rather than the last accepted step. The last accepted step is now stored in state.y_accepted instead of state.y_eval. This means we don't have to use tree_where to construct prev_aux anymore and all minimisers and least square solvers compose with BestSoFarMinimiser in the same way—including the very latest iterate in the sequence rather than the lagged accepted. Note that this means that the y returned will be worse than y_accepted on rejected steps, but as BestSoFarMinimiser sees all iterates this is not an issue.

Once this is merged I can have a think about whether a wider unification of line-search solvers is possible.

@johannahaffner
Copy link
Copy Markdown
Collaborator

johannahaffner commented Apr 13, 2026

Edit: just changed the base to a new dev branch.

@johannahaffner johannahaffner changed the base branch from main to dev April 13, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants