Introduce NsgaiiBuilder and TpeBuilder for samplers - #212
Open
Alnusjaponica wants to merge 2 commits into
Open
Alnusjaponica wants to merge 2 commits into
Alnusjaponica wants to merge 2 commits into
Conversation
Alnusjaponica
marked this pull request as draft
August 18, 2026 02:40
Replace the XxxConfig/from_config construction pattern with builders following the API style of std::thread::Builder: settings are configured by chaining setter methods and the sampler is created with `build`. NSGAIISampler and TpeSampler keep `new`, `seed_from_u64` and `Default` for backward compatibility, and they now delegate to the builders. The pyo3 bindings construct samplers through the builders as well.
Alnusjaponica
force-pushed
the
feat/nsgaii-builder
branch
from
September 25, 2026 17:33
33393ee to
9bc211c
Compare
Alnusjaponica
marked this pull request as ready for review
September 28, 2026 02:20
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.
Summary
Replace the
XxxConfig/from_configconstruction pattern with builders following the API style ofstd::thread::Builder: settings are configured by chaining setter methods and the sampler is created withbuild.Changes
NsgaiiBuilderandTpeBuilder(withDefault) exposingbuilder(), chainable setters, andbuild()NsgaiiConfig/TpeConfigandfrom_confignew,seed_from_u64, andDefaulton the samplers for backward compatibility; they now delegate to the builders