pub struct DistributedConfig {
pub strategy: DistributedStrategy,
pub backend: CommunicationBackend,
pub world_size: usize,
pub rank: usize,
pub gradient_aggregation: GradientAggregation,
pub sync_frequency: usize,
}Expand description
Distributed trainer configuration
Fields§
§strategy: DistributedStrategy§backend: CommunicationBackend§world_size: usize§rank: usize§gradient_aggregation: GradientAggregation§sync_frequency: usizeImplementations§
Source§impl DistributedConfig
impl DistributedConfig
pub fn new(world_size: usize, rank: usize) -> Self
pub fn strategy(self, strategy: DistributedStrategy) -> Self
pub fn backend(self, backend: CommunicationBackend) -> Self
pub fn gradient_aggregation(self, agg: GradientAggregation) -> Self
pub fn sync_frequency(self, freq: usize) -> Self
Auto Trait Implementations§
impl Freeze for DistributedConfig
impl RefUnwindSafe for DistributedConfig
impl Send for DistributedConfig
impl Sync for DistributedConfig
impl Unpin for DistributedConfig
impl UnwindSafe for DistributedConfig
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> 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