Spaces:
Sleeping
Sleeping
Update components/federated_learning.py
Browse files
components/federated_learning.py
CHANGED
|
@@ -11,6 +11,18 @@ def run_federated_learning():
|
|
| 11 |
3. Data loaders.
|
| 12 |
4. Proper handling of FL strategies.
|
| 13 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
class FlowerClient(fl.client.NumPyClient):
|
| 16 |
def __init__(self, model, trainloader, valloader):
|
|
|
|
| 11 |
3. Data loaders.
|
| 12 |
4. Proper handling of FL strategies.
|
| 13 |
"""
|
| 14 |
+
return """
|
| 15 |
+
Federated Learning Implementation Status
|
| 16 |
+
<br><br>
|
| 17 |
+
This is a conceptual federated learning implementation. Actual data and the requirements are not implemented.
|
| 18 |
+
<br><br>
|
| 19 |
+
|
| 20 |
+
To implement Federated Learning in reality with all the requirements you need:
|
| 21 |
+
<br>1. A defined model architecture: Check the FL Client and model defined with model parameters and model code.
|
| 22 |
+
<br>2. A training loop using PyTorch or TensorFlow: Training and validation needs to be provided, also look the parameter setup and the model
|
| 23 |
+
<br>3. Data loaders: Data needs to be correctly loaded into the program.
|
| 24 |
+
<br>4. Proper handling of FL strategies: FL learning algorithms needs to be correctly provided.
|
| 25 |
+
"""
|
| 26 |
|
| 27 |
class FlowerClient(fl.client.NumPyClient):
|
| 28 |
def __init__(self, model, trainloader, valloader):
|