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: PathBufThe 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: u64How many trials to run in total (counts the trials already in the study).
parallel: usizeHow many child processes to run at once.
param: Vec<String>A parameter to tune, written name=<dsl-spec> (repeatable).
seed: u64The study seed — only used when the study is first created.
maximize: boolMaximize the objective instead of minimizing it (first-create only).
sampler: SamplerKindWhich sampler chooses the parameters.
retry: u32Re-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: usizeHow 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: boolAlso 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
impl Args for RunArgs
§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of arguments§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read more§impl FromArgMatches for RunArgs
impl FromArgMatches for RunArgs
§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for RunArgs
impl RefUnwindSafe for RunArgs
impl Send for RunArgs
impl Sync for RunArgs
impl Unpin for RunArgs
impl UnsafeUnpin for RunArgs
impl UnwindSafe for RunArgs
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
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