Trait EventProcessorTraining
pub trait EventProcessorTraining<TrainEvent, ValidEvent>: Send {
// Required methods
fn process_train(
&mut self,
event: TrainEvent,
) -> Result<(), EventProcessorError>;
fn process_valid(
&mut self,
event: ValidEvent,
) -> Result<(), EventProcessorError>;
fn renderer(self) -> Box<dyn MetricsRenderer>;
// Provided method
fn flush(&mut self) -> Result<(), EventProcessorError> { ... }
}Expand description
Process events happening during training and validation.
Required Methods§
fn process_train(
&mut self,
event: TrainEvent,
) -> Result<(), EventProcessorError>
fn process_train( &mut self, event: TrainEvent, ) -> Result<(), EventProcessorError>
Collect a training event.
§Errors
Returns a EventProcessorError listing every metric that could not process the event.
The other metrics still processed it. Note that an asynchronous processor reports
it on a later call instead (see AsyncProcessorTraining).
fn process_valid(
&mut self,
event: ValidEvent,
) -> Result<(), EventProcessorError>
fn process_valid( &mut self, event: ValidEvent, ) -> Result<(), EventProcessorError>
fn renderer(self) -> Box<dyn MetricsRenderer>
fn renderer(self) -> Box<dyn MetricsRenderer>
Returns the renderer used for training.
Provided Methods§
fn flush(&mut self) -> Result<(), EventProcessorError>
fn flush(&mut self) -> Result<(), EventProcessorError>
Wait until previously submitted events are processed (no-op for sync processors).
§Errors
Returns a EventProcessorError listing every metric failure among the events processed
since the last error was reported.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".