pub struct StageSpec {
pub graph: Graph,
pub input: String,
pub output: String,
pub weights: Vec<WeightRef>,
pub device: String,
}Expand description
A self-describing unit of work for a worker: everything needed to run one stage of a model, with nothing implied by convention.
Fields§
§graph: Graph§input: StringInput node name the activation feeds.
output: StringOutput node name (informational; run returns the single output).
weights: Vec<WeightRef>§device: StringDevice directive: auto (fastest available) or a device name
(cuda, metal, cpu, …). Honored against local availability.
Implementations§
Source§impl StageSpec
impl StageSpec
Sourcepub fn new(
graph: Graph,
input: impl Into<String>,
output: impl Into<String>,
device: impl Into<String>,
) -> Self
pub fn new( graph: Graph, input: impl Into<String>, output: impl Into<String>, device: impl Into<String>, ) -> Self
A stage whose weights all come from uri_for(param_name), on device.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StageSpec
impl<'de> Deserialize<'de> for StageSpec
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 StageSpec
impl RefUnwindSafe for StageSpec
impl Send for StageSpec
impl Sync for StageSpec
impl Unpin for StageSpec
impl UnsafeUnpin for StageSpec
impl UnwindSafe for StageSpec
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