Repository navigation
feat(move_thread_count)!: implement auto and reject zero counts - #182
Merged
Merged
Conversation
`{ count = 0 }` was silently raised to one evaluator, in local search and
in partitioned search. `MoveThreadCount::Count` and partitioned
`ThreadCount::Specific` now hold a `NonZeroUsize`, so a zero count is
rejected when the configuration is read. Partitioned search documents its
`thread_count` meanings: `auto` is one thread per partition up to the
available cores, `none` one thread, `{ count = n }` at most `n`.
BREAKING CHANGE: `MoveThreadCount::Count` holds `NonZeroUsize` and
`{ count = 0 }` is a configuration error. `ThreadCount::Specific` holds
`NonZeroUsize`.
`auto` ran exactly like `none`. It now resolves to `EvaluationPolicy::Auto` with up to four evaluators bounded by the solve's Rayon threads. An `AdaptiveEvaluator` runs each step sequentially or in parallel windows as `AutoPolicy` decides from the step's measured trial time, the previous step's candidate count, the calibrated fork-join cost of one window and the last replica rebuild, switching after eight consecutive steps favour the other mode. Leaving parallel mode releases the replicas. Every policy reaches the sequential trajectory, so `auto` changes speed only. Closes #173. BREAKING CHANGE: the default `move_thread_count = "auto"` may now evaluate local-search steps in parallel windows on up to four evaluators, which forks up to three working-solution replicas.
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.
Closes #173. Base
main@bd910d01, two commits:6bc823bafix(move_thread_count)!: reject zero thread counts51e1bcaffeat(move_thread_count)!: implement the auto evaluation policyGate on
51e1bcaf(fmt, clippy -D warnings, doc-names file-length facade-reachability public-api deps, rustdoc -D warnings, examples, workspace all-feature tests, doctests): EXIT 0, 1523 passed, 0 failed, 65 result lines. Slice 1 alone: clippy, rustdoc, public-api bless, config/solver lib/solver doctests/parallel integration tests: 778 passed, 0 failed. Mutation checks:autoresolved to sequential failsevaluation_policy_resolution; anAutoPolicythat never switches fails 4 tests, including the end-to-end trajectory test.