Repository navigation
Conversation
22 Cartis-Roberts problems and the More-Wild kowalik_osborne problem wrapped their least-squares criterion in functools.partial without the mark.least_squares decorator (kowalik_osborne marked partial itself), so minimize rejected them as scalar functions returning arrays and run_benchmark silently counted them as failures. get_benchmark_problems returned the unscaled criterion as noise_free_fun while the start params were scaled, so run_benchmark computed wrong start values for failed runs and wrong criterion histories for noisy problems with scaling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Problem
arglale,arglble,bratu_2d,bratu_2d_t,bratu_3d,drcavty1–3,eigena,eigenb, the sixflosp2*,hydcar6,hydcar20,qr3d,qr3dbd,yatpsq_1,yatpsq_2) and the More-Wildkowalik_osborneproblem define their criterion withfunctools.partialbut withoutmark.least_squares. (kowalik_osborneusedmark.least_squares(partial)(...), which markspartialitself.)get_benchmark_problemstherefore treats them as scalar problems,minimizeraisesInvalidFunctionError("Scalar objective values need to be scalars"), andrun_benchmarkwitherror_handling="continue"silently counts them as failures. Four of them are in theestimagicset.scaling=True,noise_free_funis the unscaled criterion whileinputs["params"]are scaled.run_benchmarktherefore computes wrong start values for failed runs and wrong criterion histories for noisy problems (e.g. 9972 instead of 24.2 at the start ofrosenbrock_good_start).Changes
mark.least_squares.noise_free_funlike the criterion, with the same scaling but without noise.noise_free_funreproduces the start criterion at the scaled params; minimizing a partialled problem works;run_benchmarkwith noise and scaling starts at the correct value.🤖 Generated with Claude Code