Struct Recipe
#[non_exhaustive]pub struct Recipe {
pub schema: String,
pub version: u32,
pub leaf: u64,
pub segments: Vec<RecipeSegment>,
}Expand description
The schedule that produced one trial: its lineage as replayable segments.
Built by Study::recipe from parent links
and atune.lineage records only — never from reports. The segments run from
the start of the leaf’s inherited training to the leaf: the first is a root,
a fresh restart, or a child that started without a checkpoint (its event
still names the donor), and each later segment continues its predecessor’s
checkpoint. to_json is the versioned export
({"schema": "atune.recipe", "version": 1, ...}), byte-for-byte
deterministic for one study state.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.schema: StringAlways RECIPE_SCHEMA.
version: u32Always RECIPE_VERSION.
leaf: u64The per-study number of the trial this recipe produces.
segments: Vec<RecipeSegment>The segments, from the start of the inherited training to the leaf.
Implementations§
§impl Recipe
impl Recipe
pub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
The versioned JSON export: two-space indented, fields in declaration order, parameters sorted by name, so equal recipes give equal bytes.
§Errors
Error::Storage if serialization fails (a non-finite float in a
parameter).
pub fn params_at(&self, step: u64) -> &Assignment
pub fn params_at(&self, step: u64) -> &Assignment
The configuration the schedule trains with at step: that of the
segment whose [start_step, end_step) contains it, the last segment
for any step at or after its start, and the first segment for a step
before every start. An empty recipe (never built by
Study::recipe) has an empty
configuration.