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

Profile: improve profiling code #1447

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft

Profile: improve profiling code #1447

wants to merge 12 commits into from

Conversation

Doresic
Copy link
Contributor

@Doresic Doresic commented Aug 14, 2024

No description provided.

Implement two targets: higher and lower. Choose which one to go to depending on first guess.
Different calculation of next_obj_target

TODO: change 1.5 to magic factor
Implemented adaptive max and min steps in profiling. If the optimization during profiling fails (results in inf value), the algorithm will first try to iteratively decrease `max_step_size` to be closer to the last point that had a successful optimization. If that doesn't work (if we reduce max_step_size below min_step_size), then max_step_size is set back to the default and we try to increase min_step_size to "jump over" the problematic area.

Resampling random points and start from those is only the last resort and will be done if these two do not work. The idea is that we want to stay as close as we can to the last profiling point.

TODO: Put the adaptive reduction/increase of max_step_size/min_step_size into options
- BUGFIX: absolute value in objective targets at last_delta_fval
- BUGFIX: extrapolation explosions if we start at boundary
- Feature: Trust region on extrapolation
- Added y ticks back into the plot, sometimes the range is completely different.
- Added points to the plotting of profiles (in case of one result and one profile list id)
- Added color change to plotting of profiles (in case of one result and one profile list id)
- LOGGING: added logging.INFO with informations of steps made and successful optimizations.
@Doresic Doresic marked this pull request as draft August 14, 2024 13:31
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

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

Codecov Report

Attention: Patch coverage is 70.50360% with 41 lines in your changes missing coverage. Please review.

Project coverage is 83.23%. Comparing base (bd4b81b) to head (6914d19).

Files Patch % Lines
pypesto/profile/walk_along_profile.py 46.80% 25 Missing ⚠️
pypesto/profile/profile_next_guess.py 75.00% 13 Missing ⚠️
pypesto/visualize/profiles.py 91.42% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1447      +/-   ##
===========================================
- Coverage    83.41%   83.23%   -0.18%     
===========================================
  Files          161      161              
  Lines        13460    13567     +107     
===========================================
+ Hits         11228    11293      +65     
- Misses        2232     2274      +42     

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

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