pub struct TrainingProgress {
pub total_epochs: usize,
pub current_epoch: usize,
pub metrics: HashMap<String, Vec<f64>>,
}Expand description
Training progress tracker.
Combines epoch tracking with multi-metric recording and progress reporting.
Fields§
§total_epochs: usizeTotal number of planned epochs.
current_epoch: usizeCurrent epoch (0-indexed, incremented by advance_epoch).
metrics: HashMap<String, Vec<f64>>Recorded metrics keyed by name, each with a history of values.
Implementations§
Source§impl TrainingProgress
impl TrainingProgress
Sourcepub fn record(&mut self, metric_name: impl Into<String>, value: f64)
pub fn record(&mut self, metric_name: impl Into<String>, value: f64)
Record a metric value for the current epoch.
Sourcepub fn progress_fraction(&self) -> f64
pub fn progress_fraction(&self) -> f64
Fraction of training completed (current / total).
Sourcepub fn advance_epoch(&mut self)
pub fn advance_epoch(&mut self)
Advance to the next epoch.
Sourcepub fn latest(&self, metric_name: &str) -> Option<f64>
pub fn latest(&self, metric_name: &str) -> Option<f64>
Get the latest recorded value for a metric.
Trait Implementations§
Source§impl Clone for TrainingProgress
impl Clone for TrainingProgress
Source§fn clone(&self) -> TrainingProgress
fn clone(&self) -> TrainingProgress
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 moreAuto Trait Implementations§
impl Freeze for TrainingProgress
impl RefUnwindSafe for TrainingProgress
impl Send for TrainingProgress
impl Sync for TrainingProgress
impl Unpin for TrainingProgress
impl UnsafeUnpin for TrainingProgress
impl UnwindSafe for TrainingProgress
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> 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