pub trait ModelDistribution: Send + Sync {
// Required methods
fn distribute_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn distribute_model_variant<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
variant_id: &'life3 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn distribute_model_delta<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
from_version: &'life2 str,
to_version: &'life3 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn convergence_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ModelConvergenceStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
to_version: &'life2 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn node_model_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<NodeModelStatus>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn nodes_with_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeModelStatus>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 ModelDistributionHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn subscribe_convergence<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ModelConvergenceStatus>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Model distribution service for AI/ML model deployment
Provides model-specific distribution with variant selection, convergence tracking, and rollback capabilities.
Required Methods§
Sourcefn distribute_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn distribute_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Distribute a model version to target platforms
Selects appropriate variant based on target capabilities and initiates distribution. Variant selection considers GPU memory, CPU architecture, and available execution providers.
§Arguments
model_id- Model identifier (e.g., “target_recognition”)version- Semantic version (e.g., “4.2.1”)scope- Target platforms (all, formation, specific nodes, capable)priority- Transfer priority
§Returns
Handle for tracking distribution progress
Sourcefn distribute_model_variant<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
variant_id: &'life3 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn distribute_model_variant<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
variant_id: &'life3 str,
scope: DistributionScope,
priority: TransferPriority,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Distribute a model with explicit variant selection
Use when automatic variant selection is not desired.
Sourcefn distribute_model_delta<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
from_version: &'life2 str,
to_version: &'life3 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn distribute_model_delta<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
from_version: &'life2 str,
to_version: &'life3 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Distribute model delta (differential update)
For large models, only transfer changed chunks between versions.
Requires target platforms to have from_version locally.
§Note
Delta updates use content-defined chunking to minimize transfer size.
If target doesn’t have from_version, falls back to full distribution.
Sourcefn convergence_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ModelConvergenceStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn convergence_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ModelConvergenceStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get convergence status for a model version
Returns detailed status of how many platforms have converged to the target version, what’s blocking others, and estimated completion.
Sourcefn rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
to_version: &'life2 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
to_version: &'life2 str,
scope: DistributionScope,
) -> Pin<Box<dyn Future<Output = Result<ModelDistributionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Initiate rollback to a previous version
Distributes the previous version to all platforms that have the current (problematic) version.
Sourcefn node_model_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<NodeModelStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn node_model_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
node_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<NodeModelStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get model status on a specific node
Sourcefn nodes_with_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeModelStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn nodes_with_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<NodeModelStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List all nodes with a specific model version
Sourcefn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 ModelDistributionHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 ModelDistributionHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel an in-progress model distribution
Sourcefn subscribe_convergence<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ModelConvergenceStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn subscribe_convergence<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
model_id: &'life1 str,
target_version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ModelConvergenceStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Subscribe to convergence status updates