Skip to content

Profile method 1 stabilisation and default#1713

Draft
Doresic wants to merge 4 commits into
profile-multi_start_profilingfrom
profile-method_1_stabilisation_and_default
Draft

Profile method 1 stabilisation and default#1713
Doresic wants to merge 4 commits into
profile-multi_start_profilingfrom
profile-method_1_stabilisation_and_default

Conversation

@Doresic
Copy link
Copy Markdown
Contributor

@Doresic Doresic commented May 8, 2026

Profiling with extrapolation can be unstable when parameters that do not actually move with the profiled parameter still get extrapolated. In that case, the recent profile history mostly reflects optimizer noise, and extrapolating from it can make the profile walk bounce around or fail.

I changed the defaults toward more conservative behavior:

  • change the default next_guess_method from adaptive_step_order_1 to adaptive_step_order_0
  • change the default reg_order from 4 to 1
  • add correlation_threshold (default 0.7) for adaptive_step_regression

The idea behind the correlation filter is simple: only extrapolate parameters that are actually moving together with the profiled one. If a parameter is not moving with the profiled parameter in the current region, we now keep it at its current value and let the optimizer decide instead of extrapolating noise.

I also clarified the docstrings around adaptive_step_order_1 vs adaptive_step_regression, kept regression rank reduction local to each parameter, and extended the related option validation.

This also moves the defaults toward the benchmark-backed o0 n6 medium configuration.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.12%. Comparing base (c95dc30) to head (fa0f571).

Files with missing lines Patch % Lines
pypesto/profile/profile_next_guess.py 85.71% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@                        Coverage Diff                        @@
##           profile-multi_start_profiling    #1713      +/-   ##
=================================================================
+ Coverage                          84.10%   84.12%   +0.01%     
=================================================================
  Files                                164      164              
  Lines                              14646    14661      +15     
=================================================================
+ Hits                               12318    12333      +15     
  Misses                              2328     2328              

☔ View full report in Codecov by Sentry.
📢 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.

@Doresic Doresic changed the base branch from develop to profile-multi_start_profiling May 13, 2026 12:11
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