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.

Implementations on Foreign Types§

Source§

impl StateAggregator for FederatedAggregation

Source§

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

Implementors§