Skip to content

Avoid duplicate function evaluation in hybrid methods - #532

Merged
jverzani merged 1 commit into
masterfrom
dmw/hybrid-duplicate-eval
Sep 28, 2026
Merged

jverzani merged 1 commit into
masterfrom
dmw/hybrid-duplicate-eval

Conversation

@devmotion

Copy link
Copy Markdown
Member

Fixes #531.

After update_state, the hybrid solve! re-evaluated F at the proposed point even when the step was not adjusted. Now it only re-evaluates when the step was shortened or lengthened. Adds a regression test that no point is evaluated twice in a row.

🤖 Generated with Claude Code

Only re-evaluate the function in the hybrid solve! when the proposed step
was adjusted; otherwise update_state has already computed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.84%. Comparing base (8a3e8a3) to head (4e07ae9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
+ Coverage   86.80%   86.84%   +0.04%     
==========================================
  Files          43       43              
  Lines        2697     2698       +1     
==========================================
+ Hits         2341     2343       +2     
+ Misses        356      355       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jverzani

Copy link
Copy Markdown
Member

Thanks so much!

@jverzani
jverzani merged commit d369ec1 into master Sep 28, 2026
13 of 16 checks passed
@jverzani
jverzani deleted the dmw/hybrid-duplicate-eval branch September 28, 2026 21:41
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.

Hybrid methods evaluate the function twice per Newton step

2 participants