oa::ml::training::TrainingSnapshot

Immutable state supplied to metrics and callbacks.

StRust public API

Declaration

pub struct TrainingSnapshot { /* private fields */ }
Public Rust declaration.

Public Methods

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
pub fn wall_samples_per_second(self) -> f64
pub fn wall_units_per_second(self) -> f64
pub fn wall_source_units_per_second(self) -> f64
pub fn epoch_source_units_per_second(self) -> f64
pub fn gpu_samples_per_second(self) -> f64
pub fn gpu_units_per_second(self) -> f64
pub fn gpu_source_units_per_second(self) -> f64
pub fn wall_ms_per_step(self) -> f64
fn clone(&self) -> TrainingSnapshot
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Public Method Documentation

pub const fn step_count( self ) -> u64
Return completed samples per wall-clock second.
pub const fn total_steps( self ) -> u64
Return completed samples per wall-clock second.
pub const fn epoch( self ) -> u64
Return completed samples per wall-clock second.
pub const fn total_epochs( self ) -> u64
Return completed samples per wall-clock second.
pub const fn step_in_epoch( self ) -> u64
Return completed samples per wall-clock second.
pub const fn steps_in_epoch( self ) -> u64
Return completed samples per wall-clock second.
pub const fn is_epoch_boundary( self ) -> bool
Return completed samples per wall-clock second.
pub const fn is_last_step( self ) -> bool
Return completed samples per wall-clock second.
pub const fn last_loss( self ) -> Option<f32>
Return completed samples per wall-clock second.
pub const fn last_gpu_time( self ) -> Option<Duration>
Return completed samples per wall-clock second.
pub const fn gpu_timing_stats( self ) -> GpuTimingStats
Return completed samples per wall-clock second.
pub const fn total_samples( self ) -> u64
Return completed samples per wall-clock second.
pub const fn total_units( self ) -> u64
Return completed samples per wall-clock second.
pub const fn total_source_units( self ) -> u64
Return completed samples per wall-clock second.
pub const fn elapsed( self ) -> Duration
Return completed samples per wall-clock second.
pub const fn epoch_elapsed( self ) -> Duration
Return completed samples per wall-clock second.
pub const fn training_mean_loss( self ) -> f64
Return completed samples per wall-clock second.
pub const fn epoch_mean_loss( self ) -> f64
Return completed samples per wall-clock second.
pub fn wall_samples_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn wall_units_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn wall_source_units_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn epoch_source_units_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn gpu_samples_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn gpu_units_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn gpu_source_units_per_second( self ) -> f64
No public source comment is attached to this declaration.
pub fn wall_ms_per_step( self ) -> f64
No public source comment is attached to this declaration.
fn clone( &self ) -> TrainingSnapshot
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.