Skip to main content

StateAggregator

Trait StateAggregator 

Source
pub trait StateAggregator {
    // Required method
    fn aggregate(
        &self,
        states: &[HashMap<String, Value>],
    ) -> Result<HashMap<String, Value>>;
}
Expand description

Contract for federated state aggregation.

Required Methods§

Source

fn aggregate( &self, states: &[HashMap<String, Value>], ) -> Result<HashMap<String, Value>>

Combine per-worker trained states (keyed by node id) into the one set redistributed to every worker.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StateAggregator for FederatedAggregation

Source§

fn aggregate( &self, states: &[HashMap<String, Value>], ) -> Result<HashMap<String, Value>>

Implementors§