pub struct SweepSpec {
pub model: String,
pub fixed: Vec<(String, String)>,
pub run: RunSettings,
pub measure: MeasureSettings,
pub seeds: SeedSettings,
pub actions: Vec<ActionSpec>,
pub blocks: Vec<BlockSpec>,
pub search: Option<SearchSpec>,
}Expand description
A sweep as written, with parameter values still in text.
SweepSpec::plan checks it against a model and lists its configs.
Fields§
§model: StringId of the model to run.
fixed: Vec<(String, String)>Values every config shares, as (id, value) pairs in the form that --set accepts.
run: RunSettingsLength and end of each run, and the number of runs per config.
measure: MeasureSettingsTicks each run samples, and the values it keeps from them.
seeds: SeedSettingsSeeds of the runs.
actions: Vec<ActionSpec>Actions every run fires. Actions due at the same tick fire in list order.
blocks: Vec<BlockSpec>Blocks whose configs the sweep runs, in order. An empty list runs the fixed values alone.
search: Option<SearchSpec>Search that picks the configs to run instead of blocks, None for a sweep.
Each candidate of a search runs RunSettings::replicates times, over the fixed values and actions above.
Implementations§
Source§impl SweepSpec
impl SweepSpec
Sourcepub fn plan(&self, schema: &ModelSchema<'_>) -> Result<Plan, PlanError>
pub fn plan(&self, schema: &ModelSchema<'_>) -> Result<Plan, PlanError>
Checks the spec against schema, and lists its configs.
§Errors
Returns PlanError for a spec that refers to another model, no replicates, settings MeasurePlan::check
rejects, a reducer or stop condition over no stat label, an action the model does not declare or a name two
actions share, a value or factor that the model’s parameters or the spec’s actions reject, a parameter both
fixed and varied, a target varied twice in one block, a block whose design cannot combine its factors, or more
than MAX_RUNS runs.