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

Change the default mode of CachingOptimizer #1254

Merged
merged 3 commits into from
Apr 30, 2021
Merged

Change the default mode of CachingOptimizer #1254

merged 3 commits into from
Apr 30, 2021

Conversation

odow
Copy link
Member

@odow odow commented Mar 1, 2021

Another way of fixing #1249.

The default of a CachingOptimizer is to initialize in ATTACHED_OPTIMIZER mode. This has two consequences:

  • Solvers that do not support incremental building will throw an error at the first incremental call and reset the optimizer.
  • Solvers that do support incremental building will build incrementally, even if they have a fast copy_to available.

It seems like a much more sensible default is to initialize in EMPTY_OPTIMIZER mode.

  • Solvers that do not support incremental building no longer need to catch an error
  • Solvers that do support incremental building will use the fast copy_to if available.

This is breaking (see the test change), so we may want to hold off until MOI 0.10, but it does need doing.

@odow odow requested review from blegat and mlubin March 1, 2021 05:45
Copy link
Member

@mlubin mlubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, pretty clean fix. Agreed it should be for MOI 0.10.

@odow odow added this to the v0.10 milestone Mar 2, 2021
Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I don't think it's breaking. We can release this in a patch release. It only affect the state in AUTOMATIC mode anyway

@blegat blegat mentioned this pull request Mar 9, 2021
7 tasks
@odow odow closed this Apr 30, 2021
@odow odow reopened this Apr 30, 2021
@odow odow merged commit 70c00cb into master Apr 30, 2021
@odow odow deleted the od/chg_default branch April 30, 2021 23:49
@blegat blegat mentioned this pull request Jun 15, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants