pub struct LearningSession {
pub id: String,
pub model_type: GnnModelType,
pub status: TrainingStatus,
pub metrics: TrainingMetrics,
pub started_at: Timestamp,
pub updated_at: Timestamp,
pub completed_at: Option<Timestamp>,
pub config: LearningConfig,
pub metrics_history: Vec<TrainingMetrics>,
pub best_metrics: Option<TrainingMetrics>,
pub error_message: Option<String>,
pub checkpoint_count: usize,
}Expand description
A learning session tracking the state of a training run
Fields§
§id: StringUnique session identifier
model_type: GnnModelTypeType of GNN model being trained
status: TrainingStatusCurrent training status
metrics: TrainingMetricsCurrent training metrics
started_at: TimestampWhen the session was started
updated_at: TimestampWhen the session was last updated
completed_at: Option<Timestamp>When the session completed (if applicable)
config: LearningConfigConfiguration used for this session
metrics_history: Vec<TrainingMetrics>History of metrics per epoch
best_metrics: Option<TrainingMetrics>Best metrics achieved during training
error_message: Option<String>Error message if training failed
checkpoint_count: usizeNumber of checkpoints saved
Implementations§
Source§impl LearningSession
impl LearningSession
Sourcepub fn new(config: LearningConfig) -> Self
pub fn new(config: LearningConfig) -> Self
Create a new learning session
Sourcepub fn update_metrics(&mut self, metrics: TrainingMetrics)
pub fn update_metrics(&mut self, metrics: TrainingMetrics)
Update metrics for a completed epoch
Sourcepub fn should_early_stop(&self) -> bool
pub fn should_early_stop(&self) -> bool
Check if training should stop early
Trait Implementations§
Source§impl Clone for LearningSession
impl Clone for LearningSession
Source§fn clone(&self) -> LearningSession
fn clone(&self) -> LearningSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LearningSession
impl Debug for LearningSession
Source§impl<'de> Deserialize<'de> for LearningSession
impl<'de> Deserialize<'de> for LearningSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LearningSession
impl RefUnwindSafe for LearningSession
impl Send for LearningSession
impl Sync for LearningSession
impl Unpin for LearningSession
impl UnwindSafe for LearningSession
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,
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