pub struct DistributedSamplerState {
pub length: u64,
pub replicas: u64,
pub rank: u64,
pub shuffle: bool,
pub seed: u64,
pub drop_last: bool,
pub epoch: u64,
pub position: u64,
}Expand description
Serialized configuration and cursor for DistributedSampler.
Fields§
§length: u64Global dataset length.
replicas: u64Replica count.
rank: u64This sampler’s rank.
shuffle: boolWhether the global indices are shuffled.
seed: u64Base seed.
drop_last: boolWhether the global tail is truncated.
epoch: u64Active epoch.
position: u64Next rank-local occurrence position.
Trait Implementations§
Source§impl Clone for DistributedSamplerState
impl Clone for DistributedSamplerState
Source§impl Debug for DistributedSamplerState
impl Debug for DistributedSamplerState
Source§impl<'de> Deserialize<'de> for DistributedSamplerState
impl<'de> Deserialize<'de> for DistributedSamplerState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for DistributedSamplerState
impl Freeze for DistributedSamplerState
impl RefUnwindSafe for DistributedSamplerState
impl Send for DistributedSamplerState
impl Sync for DistributedSamplerState
impl Unpin for DistributedSamplerState
impl UnsafeUnpin for DistributedSamplerState
impl UnwindSafe for DistributedSamplerState
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