Repository navigation
Pass the inverse Hessian in the initial_invH tests - #1300
Merged
Merged
Conversation
The BFGS `initial_invH` test passed the Hessian diag(1, eta) rather than its inverse and checked only convergence, which holds whether or not `initial_invH` is used. Pass diag(1, 1/eta). On this quadratic the first step is then the Newton step, so assert that BFGS stops after one iteration. It takes 4 iterations without `initial_invH` and 5 with the Hessian, so the check fails if the keyword is ignored or misapplied. The block appears in both test/general/optimize.jl and test/multivariate/optimize/optimize.jl; fix both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1300 +/- ##
=======================================
Coverage 87.55% 87.55%
=======================================
Files 52 52
Lines 5032 5032
=======================================
Hits 4406 4406
Misses 626 626 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
Contributor
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
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
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.
The BFGS
initial_invHtest passed the Hessiandiag(1, η)rather than its inverse. It checked only convergence, which holds whether or notinitial_invHis used. This PR passesdiag(1, 1/η). On this quadratic the first step is then the Newton step, so the test now asserts that BFGS stops after one iteration. It takes 4 iterations withoutinitial_invHand 5 with the Hessian, so the check fails if the keyword is ignored or misapplied.The block appears in both
test/general/optimize.jlandtest/multivariate/optimize/optimize.jl, and this PR fixes both. This changes tests only.🤖 Generated with Claude Code