pub struct ConsolidatedTokenBatchState {
pub version: u32,
pub sampler: ConsolidatedSamplerState,
pub lengths: Vec<usize>,
pub options: TokenBatchOptions,
}Available on crate feature
std only.Expand description
Topology-independent remaining epoch, retaining the exact length table/policy.
Fields§
§version: u32Record format, currently one.
sampler: ConsolidatedSamplerStateOnly actual unconsumed original source examples.
lengths: Vec<usize>Immutable encoded lengths indexed by original source position.
options: TokenBatchOptionsBatch partitioning policy; no additional epoch tail is dropped.
Implementations§
Source§impl ConsolidatedTokenBatchState
impl ConsolidatedTokenBatchState
Sourcepub fn validate(&self) -> Result<(), SamplerError>
pub fn validate(&self) -> Result<(), SamplerError>
Validate a continuation without changing any data-rank cursor.
Sourcepub fn consolidate(states: &[TokenBatchState]) -> Result<Self, SamplerError>
pub fn consolidate(states: &[TokenBatchState]) -> Result<Self, SamplerError>
Consolidate every data coordinate, accepting identical TP/PP copies.
Trait Implementations§
Source§impl Clone for ConsolidatedTokenBatchState
impl Clone for ConsolidatedTokenBatchState
Source§impl Debug for ConsolidatedTokenBatchState
impl Debug for ConsolidatedTokenBatchState
Source§impl<'de> Deserialize<'de> for ConsolidatedTokenBatchState
impl<'de> Deserialize<'de> for ConsolidatedTokenBatchState
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 ConsolidatedTokenBatchState
Source§impl<B: Backend> Record<B> for ConsolidatedTokenBatchState
impl<B: Backend> Record<B> for ConsolidatedTokenBatchState
Source§type Item<P: PrecisionSettings> = ConsolidatedTokenBatchState
type Item<P: PrecisionSettings> = ConsolidatedTokenBatchState
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.
impl StructuralPartialEq for ConsolidatedTokenBatchState
Auto Trait Implementations§
impl Freeze for ConsolidatedTokenBatchState
impl RefUnwindSafe for ConsolidatedTokenBatchState
impl Send for ConsolidatedTokenBatchState
impl Sync for ConsolidatedTokenBatchState
impl Unpin for ConsolidatedTokenBatchState
impl UnsafeUnpin for ConsolidatedTokenBatchState
impl UnwindSafe for ConsolidatedTokenBatchState
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.