pub struct ShardingSpec {
pub swarm_id: String,
pub layer_start: u32,
pub layer_end: u32,
pub layer_count: u32,
pub role: SwarmRole,
pub manifest_ref: Option<String>,
pub peers: Vec<SwarmPeer>,
pub coordinator: Option<String>,
}Expand description
Describes one node’s contiguous layer-block in a pipeline-parallel swarm.
Activations stream coordinator -> stages in ring order: the coordinator hands the input to the first stage, each stage runs its layer-block and forwards the result to the next peer, and the final stage returns the output back to the coordinator.
Fields§
§swarm_id: StringIdentifier shared by every node participating in this swarm.
layer_start: u32First model layer (inclusive) held by this replica.
layer_end: u32Last model layer (exclusive) held by this replica.
layer_count: u32Total number of layers in the full model.
role: SwarmRoleRole of this node within the swarm (defaults to stage).
manifest_ref: Option<String>Optional reference to the model/shard manifest this node loads.
peers: Vec<SwarmPeer>Ring peers this node streams activations to/from.
coordinator: Option<String>The coordinator service name driving this swarm.
Trait Implementations§
Source§impl Clone for ShardingSpec
impl Clone for ShardingSpec
Source§fn clone(&self) -> ShardingSpec
fn clone(&self) -> ShardingSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShardingSpec
impl Debug for ShardingSpec
Source§impl<'de> Deserialize<'de> for ShardingSpec
impl<'de> Deserialize<'de> for ShardingSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShardingSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShardingSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ShardingSpec
Source§impl PartialEq for ShardingSpec
impl PartialEq for ShardingSpec
Source§fn eq(&self, other: &ShardingSpec) -> bool
fn eq(&self, other: &ShardingSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ShardingSpec
impl Serialize for ShardingSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ShardingSpec
Source§impl Validate for ShardingSpec
impl Validate for ShardingSpec
Source§impl<'v_a> ValidateArgs<'v_a> for ShardingSpec
impl<'v_a> ValidateArgs<'v_a> for ShardingSpec
type Args = ()
fn validate_with_args( &self, args: <ShardingSpec as ValidateArgs<'v_a>>::Args, ) -> Result<(), ValidationErrors>
Auto Trait Implementations§
impl Freeze for ShardingSpec
impl RefUnwindSafe for ShardingSpec
impl Send for ShardingSpec
impl Sync for ShardingSpec
impl Unpin for ShardingSpec
impl UnsafeUnpin for ShardingSpec
impl UnwindSafe for ShardingSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.