pub struct TrainingState {
pub total_estimators: usize,
pub completed_estimators: usize,
pub failed_estimators: usize,
pub training_start_time: Option<Instant>,
pub training_duration: Option<Duration>,
pub data_size: (usize, usize),
pub parallel_efficiency: f64,
}Expand description
Training state tracking
Fields§
§total_estimators: usize§completed_estimators: usize§failed_estimators: usize§training_start_time: Option<Instant>§training_duration: Option<Duration>§data_size: (usize, usize)§parallel_efficiency: f64Implementations§
Source§impl TrainingState
impl TrainingState
pub fn new() -> Self
pub fn start_training(&mut self, n_samples: usize, n_estimators: usize)
pub fn update_progress(&mut self, _learner_id: usize, success: bool)
pub fn complete_training(&mut self, duration: Duration)
pub fn progress_percentage(&self) -> f64
Trait Implementations§
Source§impl Clone for TrainingState
impl Clone for TrainingState
Source§fn clone(&self) -> TrainingState
fn clone(&self) -> TrainingState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrainingState
impl Debug for TrainingState
Auto Trait Implementations§
impl Freeze for TrainingState
impl RefUnwindSafe for TrainingState
impl Send for TrainingState
impl Sync for TrainingState
impl Unpin for TrainingState
impl UnwindSafe for TrainingState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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