p2pfl.learning.aggregators.sequential moduleΒΆ

Sequential Learning Aggregator.

class p2pfl.learning.aggregators.sequential.SequentialLearning(disable_partial_aggregation=False)[source]ΒΆ

Bases: Aggregator

Sequential Learning Aggregator - passes a single model through unchanged.

In sequential learning (also known as cyclic learning), only one client participates per round and the model is passed sequentially between clients. This aggregator simply passes through the received model without modification.

Use cases:
  • Cyclic federated learning where clients train one after another

  • Ring topologies where the model circulates through all nodes

  • Any scenario requiring pass-through aggregation without modification

Unlike WeightAggregator or TreeAggregator, this aggregator accepts any model type (neural networks, tree ensembles, etc.) since it performs no actual aggregation - just model forwarding.

Note

This aggregator expects exactly one model per aggregation round. Passing multiple models will raise a ValueError.

Example

>>> aggregator = SequentialLearning()
>>> aggregator.set_addr("node1")
>>> result = aggregator.aggregate([single_model])
Parameters:

disable_partial_aggregation (bool)

SUPPORTS_PARTIAL_AGGREGATION: bool = TrueΒΆ
addr: strΒΆ
partial_aggregation: boolΒΆ