Struct AutoSamplerSettings
pub struct AutoSamplerSettings { /* private fields */ }Expand description
The opt-in knobs of auto_sampler_with; every one is off by default.
AutoSamplerSettings::new (also the Default) reproduces
auto_sampler exactly, so a caller opts into each refinement explicitly.
use atune::auto_sampler::{AutoSamplerSettings, DEFAULT_GP_COST_BUDGET};
assert_eq!(AutoSamplerSettings::new().gp_cost_budget(), None);
let settings = AutoSamplerSettings::new().with_gp_cost_budget(DEFAULT_GP_COST_BUDGET);
assert_eq!(settings.gp_cost_budget(), Some(DEFAULT_GP_COST_BUDGET));Implementations§
§impl AutoSamplerSettings
impl AutoSamplerSettings
pub const fn new() -> Self
pub const fn new() -> Self
All refinements off: auto_sampler_with then behaves exactly as
auto_sampler.
pub const fn with_gp_cost_budget(self, budget: u64) -> Self
pub const fn with_gp_cost_budget(self, budget: u64) -> Self
Enables cost-aware GP routing: when the ladder picks GpEi, ask GP-EI
only while gp_ask_cost(n, d) <= budget for the n completed trials
(capped at the fit window) of a d-dimensional space, and Tpe from
then on (the module docs state the
model). DEFAULT_GP_COST_BUDGET is the calibrated starting point;
gp_cost_trial_cap converts any budget to its switch trial. A pick
other than GpEi (and every build without the gp feature) ignores it.
pub const fn gp_cost_budget(&self) -> Option<u64>
pub const fn gp_cost_budget(&self) -> Option<u64>
The configured per-ask GP cost budget, or None when routing is off.
Trait Implementations§
§impl Clone for AutoSamplerSettings
impl Clone for AutoSamplerSettings
§fn clone(&self) -> AutoSamplerSettings
fn clone(&self) -> AutoSamplerSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more