Classes
DefaultStrategy
DefaultStrategy(data)
Bases: Strategy
Default strategy to be used when sampling/selecting nodes and checking whether nodes have responded or not
Strategy is: - select all node for each round - raise an error if one node does not answer - raise an error is one node returns an error
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data | FederatedDataSet | Object that includes all active nodes and the meta-data of the dataset that is going to be used for federated training. Should be passed to | required |
Source code in fedbiomed/researcher/strategies/default_strategy.py
def __init__(self, data: FederatedDataSet):
""" Constructor of Default Strategy
Args:
data: Object that includes all active nodes and the meta-data of the dataset that is going to be
used for federated training. Should be passed to `super().__init__` to initialize parent class
"""
super().__init__(data)
Functions
Strategy
Strategy(data)
Default Strategy as Parent class. Custom strategy classes must inherit from this parent class.
used for federated training.
Source code in fedbiomed/researcher/strategies/strategy.py
def __init__(self, data: FederatedDataSet):
"""
Args:
data: Object that includes all active nodes and the meta-data of the dataset that is going to be
used for federated training.
"""
self._fds = data
self._sampling_node_history = {}
self._success_node_history = {}
self._parameters = None