Repository navigation
fix: compare the first lexicographic result with the incumbent in FLOW2 - #1669
Open
Anish Mehta (anishmehta24) wants to merge 1 commit into
Open
Anish Mehta (anishmehta24) wants to merge 1 commit into
Anish Mehta (anishmehta24) wants to merge 1 commit into
Conversation
With lexico_objectives, FLOW2.lexico_compare started its history from the first result it was given and returned True without comparing it. on_trial_complete only calls it once there is an incumbent, so the incumbent's own result never entered the history and the next result always replaced it, even when it was worse. With a single objective, losses 1.0 then 5.0 left 5.0 as the incumbent. The history now starts with the incumbent, and the first result goes through the same comparison as every later one.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
With
lexico_objectives,FLOW2.lexico_comparebuilt its history from the first result it got and returnedTruewithout comparing it. It is only called once there is an incumbent (andcreate()starts every local search thread with one), so the incumbent's own result never entered the history and the next result always replaced it, even when it was worse. With one objective and losses 1.0, 5.0, 3.0, 0.5, 2.0, plain FLOW2 keeps the 1.0 incumbent until 0.5 comes in, while lexicographic FLOW2 moves to 5.0 and then 3.0.The history now starts with the incumbent, and the first result goes through the same comparison as later ones.
Related issue number
None found.
Checks
test/tune/test_lexico_flow2.py(min and max mode) fails on main and passes with the change, andpytest test/tunepasses. On the Branin-Currin setup fromtest_lexiflow_performance, the best currin is 2.05 (2.18 on main), still within the test's 2.2 check. Most of the diff inflow2.pyis re-indentation from removing theelse;git diff -wshows the actual change.