Struct RunConfig
pub struct RunConfig {
pub problem: Problem,
pub sampler: SamplerChoice,
pub scheduler: SchedulerChoice,
pub seed: u64,
pub budget: u64,
}Expand description
What a run is configured with.
Fields§
§problem: ProblemThe function to minimize.
sampler: SamplerChoiceThe sampler proposing trials.
scheduler: SchedulerChoiceThe scheduler deciding on reports.
seed: u64The study seed.
budget: u64How many trials a run creates.
Implementations§
§impl RunConfig
impl RunConfig
pub const fn new_with_demo(
problem: Problem,
sampler: SamplerChoice,
scheduler: SchedulerChoice,
) -> Self
pub const fn new_with_demo( problem: Problem, sampler: SamplerChoice, scheduler: SchedulerChoice, ) -> Self
A browser demo run with the defaults: seed 42, 100 trials.
pub const fn with_budget(self, budget: u64) -> Self
pub const fn with_budget(self, budget: u64) -> Self
The same run with another trial budget, raised to at least
MIN_BUDGET.
pub const fn grid_side(&self) -> u64
pub const fn grid_side(&self) -> u64
Points per axis of the Grid sampler’s lattice: the largest square the
budget holds, at least 2 and at most MAX_GRID_SIDE.
pub fn sampler_note(&self) -> String
pub fn sampler_note(&self) -> String
The sampler’s sentence for this run: SamplerChoice::description,
with Grid’s lattice spelled out for the budget.
pub const fn trains(&self) -> bool
pub const fn trains(&self) -> bool
Whether trials are simulated training runs that report every step (any scheduler, or DEHB’s fidelities), rather than one evaluation.
pub fn scheduler_note(&self) -> String
pub fn scheduler_note(&self) -> String
The scheduler’s sentence for this run: SchedulerChoice::description,
with cart-pole’s parameters named by what they are.
pub fn trial_note(&self) -> String
pub fn trial_note(&self) -> String
What one trial of this run is, as the page explains it.
Trait Implementations§
impl StructuralPartialEq for RunConfig
Auto Trait Implementations§
impl Freeze for RunConfig
impl RefUnwindSafe for RunConfig
impl Send for RunConfig
impl Sync for RunConfig
impl Unpin for RunConfig
impl UnsafeUnpin for RunConfig
impl UnwindSafe for RunConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more