Trait MetricsRenderer
pub trait MetricsRenderer: Send + Sync {
// Required methods
fn update_train(&mut self, state: MetricState);
fn update_valid(&mut self, state: MetricState);
fn render_train(&mut self, item: TrainingProgress);
fn render_valid(&mut self, item: TrainingProgress);
// Provided method
fn on_train_end(&mut self) -> Result<(), Box<dyn Error>> { ... }
}
Expand description
Trait for rendering metrics.
Updates the training metric state.
§Arguments
state
- The metric state.
Updates the validation metric state.
§Arguments
state
- The metric state.
Renders the training progress.
§Arguments
item
- The training progress.
Renders the validation progress.
§Arguments
item
- The validation progress.
Callback method invoked when training ends, whether it
completed successfully or was interrupted.
§Returns
A result indicating whether the end-of-training actions were successful.