pub struct ExperimentRecord {Show 23 fields
pub id: String,
pub name: String,
pub hypothesis: Option<String>,
pub pipeline_summary: String,
pub params: BTreeMap<String, Value>,
pub metrics: BTreeMap<String, f64>,
pub timestamp: DateTime<Utc>,
pub duration: Duration,
pub parent: Option<String>,
pub research_line: Option<String>,
pub tags: Vec<String>,
pub notes: Option<String>,
pub schema_version: u32,
pub kind: RecordKind,
pub run_id: Option<String>,
pub run_dir: Option<String>,
pub architecture: Option<ArchitectureFingerprint>,
pub objective: Option<String>,
pub conclusion: Option<RunConclusion>,
pub derivation: Option<DerivationMove>,
pub git: Option<GitInfo>,
pub amends: Option<String>,
pub embedding: Option<Embedding>,
}Expand description
A recorded experiment in the knowledge base.
Fields§
§id: StringUnique identifier — the run id, for records built from a run.
name: StringHuman-readable name; for a rootless record it also seeds the
research-line slug (see slugify).
hypothesis: Option<String>What the user set out to test, when declared at run start.
pipeline_summary: StringOne-line rendering of the pipeline that ran.
params: BTreeMap<String, Value>Parameters the run captured, plus seed.* entries for its seeds.
metrics: BTreeMap<String, f64>Final metric values, by name.
timestamp: DateTime<Utc>When the run started.
duration: DurationWall time of the run.
parent: Option<String>Id of the record this one descends from, when known — the other
end of derivation.
research_line: Option<String>Slug of the research line this record belongs to: inherited from the parent, or derived from the name for a root.
Free-form tags; from_run always includes
run:<id>.
notes: Option<String>Free-form human notes, set at recording time or layered on later
via an amendment.
schema_version: u32RECORD_SCHEMA_VERSION at write time; 1 for lines written
before versioning existed.
kind: RecordKindWhat this journal line is — see RecordKind.
run_id: Option<String>The run this record came from, and where its raw artifacts are — so a reader can go look at the events, diagnostics and figures this summary was distilled from.
run_dir: Option<String>Absolute path of that run directory, as recorded at write time.
architecture: Option<ArchitectureFingerprint>Structural fingerprint of the graph that ran — what
derive diffs to build the move.
objective: Option<String>Metric this experiment was optimizing, when it declared one.
conclusion: Option<RunConclusion>Deterministic, templated summary of how the run ended — the text retrieval leans on hardest after the name.
derivation: Option<DerivationMove>The move that produced this experiment from its parent.
git: Option<GitInfo>Repository state (sha, branch, dirty) when the run happened.
amends: Option<String>For kind = Amendment: the id of the record being amended.
embedding: Option<Embedding>Dense vector for semantic retrieval, tagged with the model that
produced it (see Embedding).
Implementations§
Source§impl ExperimentRecord
impl ExperimentRecord
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
A record with only its identity set: timestamped now, current schema version, every optional field absent.
Sourcepub fn from_run(summary: &RunSummary) -> Self
pub fn from_run(summary: &RunSummary) -> Self
Build a record from a finished run’s summary.
This is where pipeline_summary stops being the constant
"tracked run": everything here is read off the run directory.
A record with no parent starts its own research line, named
after the run — children inherit that name, which is what makes
the line analytics work on real data.
Sourcepub fn descended_from(self, parent: &ExperimentRecord) -> Self
pub fn descended_from(self, parent: &ExperimentRecord) -> Self
Attach this record to its parent: set parent, inherit the
research line, and compute the derivation move between them.
The line is inherited rather than recomputed so that every descendant of one root shares one name, however far it drifts.
Sourcepub fn with_extra_params(
self,
params: impl IntoIterator<Item = (String, Value)>,
) -> Self
pub fn with_extra_params( self, params: impl IntoIterator<Item = (String, Value)>, ) -> Self
Merge user-supplied parameters over whatever the run captured.
Sourcepub fn with_extra_metrics(
self,
metrics: impl IntoIterator<Item = (String, f64)>,
) -> Self
pub fn with_extra_metrics( self, metrics: impl IntoIterator<Item = (String, f64)>, ) -> Self
Merge extra metrics over whatever the run directory recorded — a study’s best-trial values, a training loop’s summary metrics.
Sourcepub fn amendment(
id: impl Into<String>,
amends: impl Into<String>,
notes: impl Into<String>,
) -> Self
pub fn amendment( id: impl Into<String>, amends: impl Into<String>, notes: impl Into<String>, ) -> Self
An amendment: a later note attached to an existing record, appended as its own line so the journal is never rewritten.
Sourcepub fn with_hypothesis(self, h: impl Into<String>) -> Self
pub fn with_hypothesis(self, h: impl Into<String>) -> Self
Set the hypothesis under test.
Sourcepub fn with_pipeline(self, summary: impl Into<String>) -> Self
pub fn with_pipeline(self, summary: impl Into<String>) -> Self
Set the one-line pipeline summary.
Sourcepub fn with_params(self, params: BTreeMap<String, Value>) -> Self
pub fn with_params(self, params: BTreeMap<String, Value>) -> Self
Replace the parameter map (with_extra_params merges).
Sourcepub fn with_metrics(self, metrics: BTreeMap<String, f64>) -> Self
pub fn with_metrics(self, metrics: BTreeMap<String, f64>) -> Self
Replace the metric map (with_extra_metrics merges).
Sourcepub fn with_duration(self, d: Duration) -> Self
pub fn with_duration(self, d: Duration) -> Self
Set the run’s wall time.
Sourcepub fn with_parent(self, parent: impl Into<String>) -> Self
pub fn with_parent(self, parent: impl Into<String>) -> Self
Set the parent id only — no line inheritance, no derivation.
descended_from is the full attachment.
Sourcepub fn with_research_line(self, line: impl Into<String>) -> Self
pub fn with_research_line(self, line: impl Into<String>) -> Self
Pin the research line explicitly, overriding inheritance.
Replace the tag list.
Sourcepub fn with_notes(self, notes: impl Into<String>) -> Self
pub fn with_notes(self, notes: impl Into<String>) -> Self
Attach free-form notes.
Sourcepub fn has_conclusion(&self) -> bool
pub fn has_conclusion(&self) -> bool
Whether this record carries a conclusion worth retrieving.
Trait Implementations§
Source§impl Clone for ExperimentRecord
impl Clone for ExperimentRecord
Source§fn clone(&self) -> ExperimentRecord
fn clone(&self) -> ExperimentRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more