forked from patrick-kidger/optimistix
-
Notifications
You must be signed in to change notification settings - Fork 0
Store the slope in PointEvalGrad
objects
#4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
bagibence
wants to merge
60
commits into
zoom_linesearch
Choose a base branch
from
slope_in_point
base: zoom_linesearch
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rue)`. Now, I noticed that the downstream `AbstractGaussNewton.terminate` method does not actually check the result when deciding whether to terminate. Rather than adjusting just the one solver, I decided to simply lift this condition into the top-level `_iterate.py`. As such we might consider whether we really need `.terminate` to return both `termintae: bool` and `result: RESULTS`. To consider what each combination means: - `terminate=True`, `result=RESULTS.successful`: done, and all went well. - `terminate=True`, `result=RESULTS.foo`: something went wrong; halt. - `terminate=False`, `result=RESULTS.successfull`: keep making more iterations. - `terminate=False`, `result=RESULTS.foo`: <invalid> So we really do need two return arguments: it's not enough to just stop if `result != RESULTS.successful`, because otherwise we have no way to communicate success-and-terminate. Now we might wonder whether this change produces a change in behaviour. I think technically yes: a solver may have set `terminate=False` and `result=RESULTS.foo`, and then later decided to switch back to being successful. In practice I don't think we ever did that, and it seems pretty sketchy anyway.
Fixed Gauss-Newton including a spurious `lx.linear_solve(..., throw=True)`
…_fix Support Optax solvers that include a linesearch
… using Zoom In the accepted branch avoid recalculating the gradient, and reuse it reading from ZoomState.current_point.grad as this is the gradient at y_eval if y_eval was accepted.
Suggested by all sources and required for test_compat to pass with BFGS.
Instead of passing lin_fn and options to searches, add a _needs_grad_at_y_eval to the searches. In AbstractQuasiNewton and AbstractGradientDescent: if the search needs the gradient, calculate it and include it in f_eval_info.
2cfa5d4
to
00e82f4
Compare
dd40198
to
032782c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.