Introduce PedAnovaBuilder for PedAnovaImportanceEvaluator - #262
Draft
Alnusjaponica wants to merge 1 commit into
Draft
Alnusjaponica wants to merge 1 commit into
Alnusjaponica wants to merge 1 commit into
Conversation
Replace the positional constructor arguments of PedAnovaImportanceEvaluator with a builder following the API style of std::thread::Builder: settings are configured by chaining setter methods and the evaluator is created with `build`. The builder exposes all evaluator settings: target_quantile, region_quantile, evaluate_on_local, n_steps, prior_weight and min_n_trials_in_regime, which were previously fixed to their internal defaults. `new` and `Default` are kept for backward compatibility and delegate to the builder. The validation moved into `build`.
Alnusjaponica
marked this pull request as draft
September 28, 2026 16:18
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 positional constructor arguments of
PedAnovaImportanceEvaluatorwith a builder following the API style ofstd::thread::Builder: settings are configured by chaining setter methods and the evaluator is created withbuild(companion of #212 for samplers).Changes
PedAnovaBuilder(withDefault) exposingbuilder(), chainable setters, andbuild()target_quantile,region_quantile,evaluate_on_local,n_steps,prior_weight, andmin_n_trials_in_regime, which were previously fixed to their internal defaultsnewandDefaultare kept for backward compatibility and now delegate to the builder0.0 < target_quantile < region_quantile <= 1.0) moved intobuildVerification
cargo test --all-features— 274 tests pass (including a newtest_builderand 3 doctests)cargo test -p rustuna_storage --locked -- --ignored(fromrustuna_pyo3) — 3 passcargo clippy --locked --workspace --lib --bins --tests --examples --all-features -- -D warnings— cleancargo fmt --all -- --check— cleanuv run --no-sync pytest tests/— 701 pass (constructor,ValueError, and warning behavior verified through the new builder path)