pub struct DistributedExecutor { /* private fields */ }Expand description
Distributed executor for multi-node graph execution
Implementations§
Source§impl DistributedExecutor
impl DistributedExecutor
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Set communication timeout
Sourcepub fn partition_graph(
&mut self,
graph: &ComputationGraph,
worker_ids: &[String],
) -> Result<(), GraphError>
pub fn partition_graph( &mut self, graph: &ComputationGraph, worker_ids: &[String], ) -> Result<(), GraphError>
Partition a graph across multiple workers Uses a simple round-robin strategy for now
Sourcepub fn get_partition(&self, worker_id: &str) -> Option<&GraphPartition>
pub fn get_partition(&self, worker_id: &str) -> Option<&GraphPartition>
Get partition for a specific worker
Sourcepub fn get_partitions(&self) -> &HashMap<String, GraphPartition>
pub fn get_partitions(&self) -> &HashMap<String, GraphPartition>
Get all partitions
Sourcepub fn get_assignment(&self, node_id: &str) -> Option<&NodeAssignment>
pub fn get_assignment(&self, node_id: &str) -> Option<&NodeAssignment>
Get node assignment
Sourcepub fn execute_distributed(
&self,
_graph: &ComputationGraph,
) -> Result<HashMap<String, Vec<f32>>, GraphError>
pub fn execute_distributed( &self, _graph: &ComputationGraph, ) -> Result<HashMap<String, Vec<f32>>, GraphError>
Execute a distributed graph NOTE: This is a stub that will be integrated with ipfrs-network
Sourcepub fn estimate_communication_cost(&self, worker_id: &str) -> usize
pub fn estimate_communication_cost(&self, worker_id: &str) -> usize
Estimate communication cost for a partition
Sourcepub fn worker_count(&self) -> usize
pub fn worker_count(&self) -> usize
Get total number of workers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DistributedExecutor
impl RefUnwindSafe for DistributedExecutor
impl Send for DistributedExecutor
impl Sync for DistributedExecutor
impl Unpin for DistributedExecutor
impl UnwindSafe for DistributedExecutor
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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