Skip to content
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

Fix lazy evaluation of gradients in line searches #101

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

w1th0utnam3
Copy link
Contributor

The Backtracking and Hager Zhang line searches always evaluated the gradient, even if it was already present (because of usage of unwrap_or). In addition, More Thuente would panic if the gradient computation returns an error (because of usage of unwrap). This PR fixes this.

Unrelated: With respect to your usage of dependabot I would recommend using squash & merge in the Github UI to avoid littering your commit history with tons of merge commits. But feel free to ignore this opinion.

@stefan-k
Copy link
Member

Good catch, thanks a lot for this PR!

Regarding merge/squash: I have to admit that I just didn't pay that much attention, but I agree that squash & merge would be more appropriate. Thanks for this comment!

@stefan-k stefan-k merged commit 9fab420 into argmin-rs:master Mar 23, 2021
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