pub struct EnhancedDistributedSampler { /* private fields */ }Expand description
Enhanced distributed sampler with multi-node support
Implementations§
Source§impl EnhancedDistributedSampler
impl EnhancedDistributedSampler
Sourcepub fn new(
num_replicas: usize,
rank: usize,
config: DistributedLoadingConfig,
) -> Result<Self>
pub fn new( num_replicas: usize, rank: usize, config: DistributedLoadingConfig, ) -> Result<Self>
Create a new enhanced distributed sampler
Sourcepub fn initialize(&mut self) -> Result<()>
pub fn initialize(&mut self) -> Result<()>
Initialize the distributed environment and establish connections
Sourcepub fn sample_indices_distributed(
&self,
dataset_len: usize,
) -> Result<Box<dyn Iterator<Item = usize> + Send>>
pub fn sample_indices_distributed( &self, dataset_len: usize, ) -> Result<Box<dyn Iterator<Item = usize> + Send>>
Sample indices with enhanced distributed coordination
Sourcepub fn load_batch_distributed<T, D>(
&self,
dataset: &D,
indices: &[usize],
) -> Result<BatchResult<T>>
pub fn load_batch_distributed<T, D>( &self, dataset: &D, indices: &[usize], ) -> Result<BatchResult<T>>
Load data with multi-node coordination and RDMA optimization
Sourcepub fn collective_operation(
&self,
op_type: CollectiveOpType,
data: Option<Vec<u8>>,
) -> Result<Option<Vec<u8>>>
pub fn collective_operation( &self, op_type: CollectiveOpType, data: Option<Vec<u8>>, ) -> Result<Option<Vec<u8>>>
Perform collective operation across all nodes
Sourcepub fn get_statistics(&self) -> DistributedLoadingStats
pub fn get_statistics(&self) -> DistributedLoadingStats
Get performance statistics
Trait Implementations§
Source§impl Sampler for EnhancedDistributedSampler
impl Sampler for EnhancedDistributedSampler
Auto Trait Implementations§
impl Freeze for EnhancedDistributedSampler
impl RefUnwindSafe for EnhancedDistributedSampler
impl Send for EnhancedDistributedSampler
impl Sync for EnhancedDistributedSampler
impl Unpin for EnhancedDistributedSampler
impl UnsafeUnpin for EnhancedDistributedSampler
impl UnwindSafe for EnhancedDistributedSampler
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