Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Profile: improve profiling code (#1447)
* Initial working update 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 * Add TODOs * Introduce adaptive max and min steps 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 * Fix flags for exiting the "trust area" * Bugfixes, Robustness, Logging, Better plotting - 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. * Fix default value for color_path * Fix color value issues -- failing tests * Add tuple to isinstance list * No color_path plotting if color requested * Fix if statements fixed_method * We're making more steps then before Test were testing whether the profiling method was making a lot of steps. Now we're making a lot more steps due to higher robustness. * Change default magic and max values * Change default method, remove TODOs * Update quality colors * Fix failing test * Fix test and docstring * Rewrite some too long if statements * Some more if statements cleanup * Change color if no * Correct y-axis in obj.fun plotting * Paul review changes * More Paul review changes * Fix if-while infinite loop bug * Correct comment variable name Co-authored-by: Maren Philipps <55318391+m-philipps@users.noreply.github.com> * Change i_color to color_i * Change docstring of color in lowlevel * Expand colors docstring * Fix color format checking and update docstring --------- Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com> Co-authored-by: Maren Philipps <55318391+m-philipps@users.noreply.github.com>
- Loading branch information