pub struct EnhancedDistributedTrainer<T: Optimizer + StatefulOptimizer> { /* private fields */ }Expand description
Enhanced distributed trainer with modern GPU optimizations
Implementations§
Source§impl<T: Optimizer + StatefulOptimizer + Clone> EnhancedDistributedTrainer<T>
impl<T: Optimizer + StatefulOptimizer + Clone> EnhancedDistributedTrainer<T>
Sourcepub fn new(config: DistributedConfig, optimizer: T) -> Result<Self>
pub fn new(config: DistributedConfig, optimizer: T) -> Result<Self>
Create new enhanced distributed trainer
Sourcepub fn register_model(
&mut self,
parameters: HashMap<String, Tensor>,
) -> Result<()>
pub fn register_model( &mut self, parameters: HashMap<String, Tensor>, ) -> Result<()>
Register model parameters for distributed training
Sourcepub fn train_step(
&mut self,
gradients: HashMap<String, Tensor>,
) -> Result<TrainingStepResult>
pub fn train_step( &mut self, gradients: HashMap<String, Tensor>, ) -> Result<TrainingStepResult>
Perform one training step with enhanced distributed optimizations
Sourcepub fn get_training_stats(&self) -> DistributedTrainingStats
pub fn get_training_stats(&self) -> DistributedTrainingStats
Get comprehensive training statistics
Sourcepub fn print_training_stats(&self)
pub fn print_training_stats(&self)
Print detailed training statistics
Sourcepub fn optimize_hyperparameters(&mut self) -> Result<T>
pub fn optimize_hyperparameters(&mut self) -> Result<T>
Optimize hyperparameters for current distributed setup
Auto Trait Implementations§
impl<T> Freeze for EnhancedDistributedTrainer<T>where
T: Freeze,
impl<T> !RefUnwindSafe for EnhancedDistributedTrainer<T>
impl<T> Send for EnhancedDistributedTrainer<T>
impl<T> Sync for EnhancedDistributedTrainer<T>
impl<T> Unpin for EnhancedDistributedTrainer<T>where
T: Unpin,
impl<T> !UnwindSafe for EnhancedDistributedTrainer<T>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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