Skip to main content

RunArgs

Struct RunArgs 

pub struct RunArgs {
Show 19 fields pub study: PathBuf, pub trials: u64, pub parallel: usize, pub param: Vec<String>, pub seed: u64, pub maximize: bool, pub sampler: SamplerKind, pub retry: u32, pub seeds: Option<u32>, pub test_seeds: Option<u32>, pub test_top_k: usize, pub aggregate: Option<AggregateKind>, pub pairing: Option<PairingKind>, pub std_lambda: Option<f64>, pub timeout: Option<f64>, pub prune_exit_code: Option<i32>, pub export_params: bool, pub name: Option<String>, pub command: Vec<String>,
}
Expand description

atune run — the one-shot subprocess tuner.

Fields§

§study: PathBuf

The journal file the study lives in (created if it does not exist).

Journal files are plaintext. Require restrictive file permissions, an encrypted volume, and protected backups (encrypted when transferred).

§trials: u64

How many trials to run in total (counts the trials already in the study).

§parallel: usize

How many child processes to run at once.

§param: Vec<String>

A parameter to tune, written name=<dsl-spec> (repeatable).

§seed: u64

The study seed — only used when the study is first created.

§maximize: bool

Maximize the objective instead of minimizing it (first-create only).

§sampler: SamplerKind

Which sampler chooses the parameters.

§retry: u32

Re-run a failed configuration up to this many extra times.

§seeds: Option<u32>

Evaluate each trial under this many tune seeds (a multi-seed fan).

1 (the default) is single-seed: no fan, one evaluation per trial. >=2 turns a trial into K replicates of the same configuration, aggregated (see --aggregate) into the objective the sampler ranks.

The seed protocol — --seeds, --test-seeds, --aggregate, --pairing and --std-lambda — is fixed when the study is created and persisted with it. On resume it is read back from the study: pass none of these flags to reuse the stored protocol, and note that passing one that disagrees with the stored protocol is a usage error (the study would otherwise mix aggregate and raw objectives). Start a new study to change the protocol.

§test_seeds: Option<u32>

After tuning, re-evaluate the top configurations on this many disjoint held-out test seeds and report the tune-vs-test gap.

0 (the default) disables the final re-evaluation stage. Part of the persisted seed protocol — see --seeds for the create-vs-resume rules.

§test_top_k: usize

How many top configurations the --test-seeds stage re-evaluates.

§aggregate: Option<AggregateKind>

How the per-seed values of a fan collapse into the sampler’s objective.

Defaults to iqm. Part of the persisted seed protocol — see --seeds for the create-vs-resume rules.

§pairing: Option<PairingKind>

How a replicate’s seed depends on the trial (paired = common random numbers).

Defaults to paired. Part of the persisted seed protocol — see --seeds for the create-vs-resume rules.

§std_lambda: Option<f64>

The dispersion weight for --aggregate mean-minus-std (ignored otherwise).

Defaults to 1.0. Part of the persisted seed protocol — see --seeds for the create-vs-resume rules.

§timeout: Option<f64>

Kill and fail a child that runs longer than this many seconds.

§prune_exit_code: Option<i32>

The child exit code that means “prune this trial” (1..=255; default 42).

§export_params: bool

Also export each sampled parameter to the child as ATUNE_PARAM_<name>.

§name: Option<String>

A name for the study — only used when the study is first created.

§command: Vec<String>

The program and its argument templates, given after --.

The first element is the program; the rest are its arguments, in which {param} is replaced by that parameter’s sampled value.

atune run executes the program directly; it is not a sandbox. Treat an untrusted objective/program as untrusted code and provide an OS/container sandbox with least privilege; atune does not enforce this.

Trait Implementations§

§

impl Args for RunArgs

§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
§

impl Debug for RunArgs

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl FromArgMatches for RunArgs

§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more