pub struct Runner { /* private fields */ }Expand description
The campaign runner (builder; see the module documentation).
Implementations§
Source§impl Runner
impl Runner
Sourcepub fn new() -> Runner
pub fn new() -> Runner
Seed 0, batches of 32 trials, all cores, 100 trials per condition, 95 % intervals.
Sourcepub fn config(self, json: impl Into<String>) -> Runner
pub fn config(self, json: impl Into<String>) -> Runner
The configuration that produced the run, a JSON document recorded in the run information (and the JSON report) next to the version, the commit and the seed.
Sourcepub fn batch(self, n: u64) -> Runner
pub fn batch(self, n: u64) -> Runner
Trials per batch (at least 1): the stopping rule is checked after every batch.
Sourcepub fn confidence(self, c: f64) -> Runner
pub fn confidence(self, c: f64) -> Runner
Confidence level of the intervals reported by the loggers (default 0.95), in
$(0, 1)$ (Runner::run refuses another value).
Sourcepub fn fast_dev_run(self, on: bool) -> Runner
pub fn fast_dev_run(self, on: bool) -> Runner
Run one batch per condition and ignore the stopping rule (a quick check).
Sourcepub fn run_info(&self, scenario: &str, n_conditions: usize) -> RunInfo
pub fn run_info(&self, scenario: &str, n_conditions: usize) -> RunInfo
What the callbacks and the loggers know about a run of this runner on the
scenario scenario over n_conditions conditions, started now (all the cores
counted for threads: 0): the header of every report, that of a run, of a search
and of a verification.
Sourcepub fn run<S: Scenario>(
self,
scenario: &S,
grid: &Grid,
) -> Result<Vec<ConditionResult>>
pub fn run<S: Scenario>( self, scenario: &S, grid: &Grid, ) -> Result<Vec<ConditionResult>>
Run the scenario on every condition of the grid.
§Errors
Error::Config for a grid that gives a key twice (Grid::check); for a
confidence level outside $(0, 1)$ (of the runner or of a precision target, see
check_confidence);
for a stopping rule that can never stop, or whose target is a
metric that the first batch of a condition does not record (or min_errors on a
mean, see Stop::check_metrics); the first error of a setup or of a trial, of
the same kind, with the condition and the trial in the message; the errors of the
loggers.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Runner
impl !Sync for Runner
impl !UnwindSafe for Runner
impl Forget for Runner
impl Freeze for Runner
impl Send for Runner
impl Unpin for Runner
impl UnsafeUnpin for Runner
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
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