pub enum EmlEvent {
Trained {
model_name: String,
samples_used: usize,
mse_before: f64,
mse_after: f64,
converged: bool,
param_count: usize,
},
Prediction {
model_name: String,
inputs_hash: String,
output: Vec<f64>,
},
Drift {
model_name: String,
predicted: f64,
actual: f64,
drift_pct: f64,
},
Saved {
model_name: String,
path: String,
param_count: usize,
},
Loaded {
model_name: String,
path: String,
trained: bool,
samples: usize,
},
Reset {
model_name: String,
reason: String,
},
}Expand description
An event emitted by an EML model during its lifecycle.
These events are accumulated in a per-model event log and drained by the caller for chain persistence. The model itself never touches the ExoChain directly.
Variants§
Trained
Model training completed.
Fields
Prediction
Significant model prediction recorded.
Fields
Drift
Drift detected between prediction and actual value.
Saved
Model state saved to disk.
Loaded
Model state loaded from disk.
Reset
Model was reset.
Implementations§
Source§impl EmlEvent
impl EmlEvent
Sourcepub fn event_type(&self) -> &'static str
pub fn event_type(&self) -> &'static str
Return the canonical event type string for chain logging.
Used as the kind field when appending to ExoChain.
Sourcepub fn model_name(&self) -> &str
pub fn model_name(&self) -> &str
Return the model name embedded in this event.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EmlEvent
impl<'de> Deserialize<'de> for EmlEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmlEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmlEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EmlEvent
impl Serialize for EmlEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for EmlEvent
impl RefUnwindSafe for EmlEvent
impl Send for EmlEvent
impl Sync for EmlEvent
impl Unpin for EmlEvent
impl UnsafeUnpin for EmlEvent
impl UnwindSafe for EmlEvent
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
Converts
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> ⓘ
Converts
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