Struct TuiMetricsRendererWrapper
pub struct TuiMetricsRendererWrapper { /* private fields */ }Expand description
The terminal UI metrics renderer.
Implementations§
§impl TuiMetricsRendererWrapper
impl TuiMetricsRendererWrapper
pub fn new(
interrupter: Interrupter,
checkpoint: Option<usize>,
) -> TuiMetricsRendererWrapper
pub fn new( interrupter: Interrupter, checkpoint: Option<usize>, ) -> TuiMetricsRendererWrapper
Create a new terminal UI renderer.
pub fn persistent(self) -> TuiMetricsRendererWrapper
pub fn persistent(self) -> TuiMetricsRendererWrapper
Set the renderer to persistent mode.
Trait Implementations§
§impl Drop for TuiMetricsRendererWrapper
impl Drop for TuiMetricsRendererWrapper
§impl EvaluationProgressLogger for TuiMetricsRendererWrapper
impl EvaluationProgressLogger for TuiMetricsRendererWrapper
§fn start_global_progress(&mut self, total_tests: usize)
fn start_global_progress(&mut self, total_tests: usize)
Called once at the start of evaluation, providing the total number of test splits.
§fn start_test(&mut self, _name: &str, total_items: usize)
fn start_test(&mut self, _name: &str, total_items: usize)
Called at the start of a test split, providing the split name and total number of items.
§fn update_test_progress(&mut self, items_processed: usize)
fn update_test_progress(&mut self, items_processed: usize)
Log the progress of the current test step.
§fn end_global_progress(&mut self)
fn end_global_progress(&mut self)
Called at the end of evaluation.
§fn log_event_evaluation(&mut self, event: String)
fn log_event_evaluation(&mut self, event: String)
Log a custom named event that falls outside the standard evaluation lifecycle callbacks.
§impl MetricsRenderer for TuiMetricsRendererWrapper
impl MetricsRenderer for TuiMetricsRendererWrapper
§fn manual_close(&mut self)
fn manual_close(&mut self)
Keep the renderer from automatically closing, requiring manual action to close it.
§fn register_metric(&mut self, definition: MetricDefinition)
fn register_metric(&mut self, definition: MetricDefinition)
Register a new metric.
§impl MetricsRendererEvaluation for TuiMetricsRendererWrapper
impl MetricsRendererEvaluation for TuiMetricsRendererWrapper
§fn update_test(&mut self, name: EvaluationName, state: MetricState)
fn update_test(&mut self, name: EvaluationName, state: MetricState)
Updates the testing metric state. Read more
§fn on_test_end(
&mut self,
summary: Option<LearnerSummary>,
) -> Result<(), Box<dyn Error>>
fn on_test_end( &mut self, summary: Option<LearnerSummary>, ) -> Result<(), Box<dyn Error>>
Callback method invoked when testing ends, whether it
completed successfully or was interrupted. Read more
§impl MetricsRendererTraining for TuiMetricsRendererWrapper
impl MetricsRendererTraining for TuiMetricsRendererWrapper
§fn update_train(&mut self, state: MetricState)
fn update_train(&mut self, state: MetricState)
Updates the training metric state. Read more
§fn update_valid(&mut self, state: MetricState)
fn update_valid(&mut self, state: MetricState)
Updates the validation metric state. Read more
§fn on_train_end(
&mut self,
summary: Option<LearnerSummary>,
) -> Result<(), Box<dyn Error>>
fn on_train_end( &mut self, summary: Option<LearnerSummary>, ) -> Result<(), Box<dyn Error>>
Callback method invoked when training ends, whether it
completed successfully or was interrupted. Read more
§impl TrainingProgressLogger for TuiMetricsRendererWrapper
impl TrainingProgressLogger for TuiMetricsRendererWrapper
§fn start(
&mut self,
total_epochs: usize,
starting_epoch: usize,
total_items: Option<usize>,
label: Option<&str>,
)
fn start( &mut self, total_epochs: usize, starting_epoch: usize, total_items: Option<usize>, label: Option<&str>, )
Called once at the start of training, providing the total number of epochs and the starting epoch. Read more
§fn update_epoch(&mut self, epoch: usize)
fn update_epoch(&mut self, epoch: usize)
Called at the end of each full epoch (after both train and valid splits complete).
§fn start_split(&mut self, split: &str, total_items: usize)
fn start_split(&mut self, split: &str, total_items: usize)
Called at the start of a training split, providing the split name and total number of items.
§fn update_split(&mut self, items_processed: usize)
fn update_split(&mut self, items_processed: usize)
Log the progress of the current training step.
§fn end(&mut self)
fn end(&mut self)
Called at the end of training, whether it completed successfully or was interrupted.
§fn log_event_training(&mut self, event: String)
fn log_event_training(&mut self, event: String)
Log a custom named event that falls outside the standard training lifecycle callbacks.
Auto Trait Implementations§
impl !RefUnwindSafe for TuiMetricsRendererWrapper
impl !UnwindSafe for TuiMetricsRendererWrapper
impl Freeze for TuiMetricsRendererWrapper
impl Send for TuiMetricsRendererWrapper
impl Sync for TuiMetricsRendererWrapper
impl Unpin for TuiMetricsRendererWrapper
impl UnsafeUnpin for TuiMetricsRendererWrapper
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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