Fix NSGA-II generation cache sync by introducing Incremental Indexing - #244
Draft
yen-0 wants to merge 1 commit into
Draft
Fix NSGA-II generation cache sync by introducing Incremental Indexing#244yen-0 wants to merge 1 commit into
yen-0 wants to merge 1 commit into
Conversation
Co-authored-by: shemmi <shemmi@preferred.jp>
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.
Motivation
After
#238, parent population cache lookup is refreshed from storage, but the child-generation index is still local to each sampler instance.As a result, one worker can miss trials that were already completed by another worker and persisted to storage, leaving
generation_to_numbersstale when assigning the next child generation.This patch incrementally resyncs the generation cache from storage while keeping the fast path from
#238.Description of change
after_trial.Benchmark
This is primarily a correctness patch for stale generation-cache synchronization. It keeps the
#238fast path and stayed faster thanmainin local runs.Rust benchmarks
Median of 3 runs on this machine:
main#179current(x, 1-x)simple(x, 1-x)dense40WFGBenchmark scripts
Rust benchmark
Used a local temporary example:
Commands:
WFG benchmark
Used a local Python benchmark: