pub struct DataRef {
pub input: String,
pub uri: String,
pub elem: usize,
pub shard_start: usize,
pub shard_len: usize,
}Expand description
One data tensor the worker feeds to a graph input every step. Resolved
node-locally from uri (a file:// raw-f32 blob, or gguf/safetensors),
then row-sharded: this rank owns samples [shard_start, shard_start+len),
each elem floats wide.
Fields§
§input: StringGraph input node name this tensor feeds (e.g. "x", "labels").
uri: StringWhere the full (unsharded) tensor lives — resolved on the worker.
elem: usizePer-sample element count (row stride into the resolved flat array).
shard_start: usizeFirst sample index of this rank’s shard.
shard_len: usizeNumber of samples in this rank’s shard.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataRef
impl<'de> Deserialize<'de> for DataRef
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 Freeze for DataRef
impl RefUnwindSafe for DataRef
impl Send for DataRef
impl Sync for DataRef
impl Unpin for DataRef
impl UnsafeUnpin for DataRef
impl UnwindSafe for DataRef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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