Skip to main content

MetricsRendererTraining

Trait MetricsRendererTraining 

pub trait MetricsRendererTraining: Send + Sync {
    // Required methods
    fn update_train(&mut self, state: MetricState);
    fn update_valid(&mut self, state: MetricState);

    // Provided method
    fn on_train_end(
        &mut self,
        summary: Option<LearnerSummary>,
    ) -> Result<(), Box<dyn Error>> { ... }
}
Expand description

Trait for rendering metrics.

Required Methods§

fn update_train(&mut self, state: MetricState)

Updates the training metric state.

§Arguments
  • state - The metric state.

fn update_valid(&mut self, state: MetricState)

Updates the validation metric state.

§Arguments
  • state - The metric state.

Provided Methods§

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.

§Returns

A result indicating whether the end-of-training actions were successful.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§