pub struct ConsolidatedSamplerState {
pub version: u32,
pub source_id: String,
pub source_length: usize,
pub epoch: u64,
pub shuffle_seed: Option<u64>,
pub tail: SampleTail,
pub epoch_size: usize,
pub consumed: usize,
pub remaining: Vec<usize>,
}Available on crate feature
std only.Expand description
Topology-independent continuation containing ONLY unconsumed epoch examples.
Fields§
§version: u32Record format, currently one.
source_id: StringImmutable dataset identity.
source_length: usizeOriginal dataset length.
epoch: u64Epoch whose remaining order is retained.
shuffle_seed: Option<u64>Shuffle configuration for subsequent epochs.
tail: SampleTailTail policy for subsequent epochs, not reapplied to this continuation.
epoch_size: usizeOriginal effective epoch size.
consumed: usizeGlobal samples already committed across all previous data layouts.
remaining: Vec<usize>Remaining source indices in their original relative global order.
Implementations§
Source§impl ConsolidatedSamplerState
impl ConsolidatedSamplerState
Sourcepub fn validate(&self) -> Result<(), SamplerError>
pub fn validate(&self) -> Result<(), SamplerError>
Validate an explicit continuation before loading it on any topology.
Sourcepub fn consolidate(records: &[SamplerState]) -> Result<Self, SamplerError>
pub fn consolidate(records: &[SamplerState]) -> Result<Self, SamplerError>
Join every data rank, accepting identical duplicate TP/PP copies. Conflicting copies, missing ranks or overlapping source indices fail.
Trait Implementations§
Source§impl Clone for ConsolidatedSamplerState
impl Clone for ConsolidatedSamplerState
Source§impl Debug for ConsolidatedSamplerState
impl Debug for ConsolidatedSamplerState
Source§impl<'de> Deserialize<'de> for ConsolidatedSamplerState
impl<'de> Deserialize<'de> for ConsolidatedSamplerState
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
impl Eq for ConsolidatedSamplerState
Source§impl PartialEq for ConsolidatedSamplerState
impl PartialEq for ConsolidatedSamplerState
Source§impl<B: Backend> Record<B> for ConsolidatedSamplerState
impl<B: Backend> Record<B> for ConsolidatedSamplerState
Source§type Item<P: PrecisionSettings> = ConsolidatedSamplerState
type Item<P: PrecisionSettings> = ConsolidatedSamplerState
Type of the item that can be serialized and deserialized.
Source§fn into_item<P: PrecisionSettings>(self) -> Self
fn into_item<P: PrecisionSettings>(self) -> Self
Convert the current record into the corresponding item that follows the given settings.
Source§fn from_item<P: PrecisionSettings>(item: Self, _: &B::Device) -> Self
fn from_item<P: PrecisionSettings>(item: Self, _: &B::Device) -> Self
Convert the given item into a record.
Source§impl Serialize for ConsolidatedSamplerState
impl Serialize for ConsolidatedSamplerState
impl StructuralPartialEq for ConsolidatedSamplerState
Auto Trait Implementations§
impl Freeze for ConsolidatedSamplerState
impl RefUnwindSafe for ConsolidatedSamplerState
impl Send for ConsolidatedSamplerState
impl Sync for ConsolidatedSamplerState
impl Unpin for ConsolidatedSamplerState
impl UnsafeUnpin for ConsolidatedSamplerState
impl UnwindSafe for ConsolidatedSamplerState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.