pub struct TrainingSnapshot { /* private fields */ }Expand description
Immutable state supplied to metrics and callbacks.
Implementations§
Source§impl TrainingSnapshot
impl TrainingSnapshot
pub const fn step_count(self) -> u64
pub const fn total_steps(self) -> u64
pub const fn epoch(self) -> u64
pub const fn total_epochs(self) -> u64
pub const fn step_in_epoch(self) -> u64
pub const fn steps_in_epoch(self) -> u64
pub const fn is_epoch_boundary(self) -> bool
pub const fn is_last_step(self) -> bool
pub const fn last_loss(self) -> Option<f32>
pub const fn last_gpu_time(self) -> Option<Duration>
pub const fn gpu_timing_stats(self) -> GpuTimingStats
pub const fn total_samples(self) -> u64
pub const fn total_units(self) -> u64
pub const fn total_source_units(self) -> u64
pub const fn elapsed(self) -> Duration
pub const fn epoch_elapsed(self) -> Duration
pub const fn training_mean_loss(self) -> f64
pub const fn epoch_mean_loss(self) -> f64
Sourcepub const fn attempted_updates(self) -> u64
pub const fn attempted_updates(self) -> u64
Total optimizer updates attempted across completed steps (including skipped AMP updates).
Sourcepub const fn applied_updates(self) -> u64
pub const fn applied_updates(self) -> u64
Total optimizer updates actually applied (excluding skipped AMP overflow updates).
Sourcepub const fn skipped_updates(self) -> u64
pub const fn skipped_updates(self) -> u64
Total optimizer updates skipped due to non-finite gradients or AMP overflow.
Sourcepub fn wall_samples_per_second(self) -> f64
pub fn wall_samples_per_second(self) -> f64
Return completed samples per wall-clock second.
Sourcepub fn wall_units_per_second(self) -> f64
pub fn wall_units_per_second(self) -> f64
Return completed sequence units per wall-clock second.
Sourcepub fn wall_source_units_per_second(self) -> f64
pub fn wall_source_units_per_second(self) -> f64
Return completed source units per wall-clock second.
Sourcepub fn epoch_source_units_per_second(self) -> f64
pub fn epoch_source_units_per_second(self) -> f64
Return completed epoch source units per wall-clock second.
Sourcepub fn gpu_samples_per_second(self) -> f64
pub fn gpu_samples_per_second(self) -> f64
Return timestamped samples per device second.
Sourcepub fn gpu_units_per_second(self) -> f64
pub fn gpu_units_per_second(self) -> f64
Return timestamped sequence units per device second.
Sourcepub fn gpu_source_units_per_second(self) -> f64
pub fn gpu_source_units_per_second(self) -> f64
Return timestamped source units per device second.
Sourcepub fn wall_ms_per_step(self) -> f64
pub fn wall_ms_per_step(self) -> f64
Return mean wall-clock milliseconds per completed step.
Trait Implementations§
Source§impl Clone for TrainingSnapshot
impl Clone for TrainingSnapshot
impl Copy for TrainingSnapshot
Auto Trait Implementations§
impl Forget for TrainingSnapshot
impl Freeze for TrainingSnapshot
impl Move for TrainingSnapshot
impl RefUnwindSafe for TrainingSnapshot
impl Send for TrainingSnapshot
impl Sync for TrainingSnapshot
impl Unpin for TrainingSnapshot
impl UnsafeUnpin for TrainingSnapshot
impl UnwindSafe for TrainingSnapshot
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