Skip to main content

ExperimentRecord

Struct ExperimentRecord 

Source
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: String

Unique identifier — the run id, for records built from a run.

§name: String

Human-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: String

One-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: Duration

Wall 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.

§tags: Vec<String>

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: u32

RECORD_SCHEMA_VERSION at write time; 1 for lines written before versioning existed.

§kind: RecordKind

What 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

Source

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.

Source

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.

Source

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.

Source

pub fn with_extra_params( self, params: impl IntoIterator<Item = (String, Value)>, ) -> Self

Merge user-supplied parameters over whatever the run captured.

Source

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.

Source

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.

Source

pub fn with_hypothesis(self, h: impl Into<String>) -> Self

Set the hypothesis under test.

Source

pub fn with_pipeline(self, summary: impl Into<String>) -> Self

Set the one-line pipeline summary.

Source

pub fn with_params(self, params: BTreeMap<String, Value>) -> Self

Replace the parameter map (with_extra_params merges).

Source

pub fn with_metrics(self, metrics: BTreeMap<String, f64>) -> Self

Replace the metric map (with_extra_metrics merges).

Source

pub fn with_duration(self, d: Duration) -> Self

Set the run’s wall time.

Source

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.

Source

pub fn with_research_line(self, line: impl Into<String>) -> Self

Pin the research line explicitly, overriding inheritance.

Source

pub fn with_tags(self, tags: Vec<String>) -> Self

Replace the tag list.

Source

pub fn with_notes(self, notes: impl Into<String>) -> Self

Attach free-form notes.

Source

pub fn has_conclusion(&self) -> bool

Whether this record carries a conclusion worth retrieving.

Source

pub fn headline(&self) -> &str

The record’s headline, or the best one-liner available.

Trait Implementations§

Source§

impl Clone for ExperimentRecord

Source§

fn clone(&self) -> ExperimentRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExperimentRecord

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExperimentRecord

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ExperimentRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

The receiver as &dyn Any, ready for downcast_ref.
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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,