Skip to content

Commit cddc385

Browse files
author
arthurPignet
committed
change names
remove old lflip reference Signed-off-by: arthurPignet <arthur.pignet@mines-paristech.fr>
1 parent f66efaa commit cddc385

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

mplc/doc/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ There are several parameters influencing how the collaborative and distributed l
302302

303303
![Schema fedavg](../../img/collaborative_rounds_fedavg.png)
304304

305-
- `'gradsavg'`: stands for gradient averaging, quite similar to federated averaging, but the partner-loss's gradients are averaged before the optimization step, instead of averaged the model's weights after the optimization step.
305+
- `'fedgrads'`: stands for gradient averaging, quite similar to federated averaging, but the partner-loss's gradients are averaged before the optimization step, instead of averaged the model's weights after the optimization step.
306306
Warning : This method needs a Keras model to work with. The `gradient_pass_per_update` is set to 1 in the current implementation.
307307

308308
- `'seq-...'`: stands for sequential and comes with 2 variations, `'seq-pure'` with no aggregation at all, and `'seq-with-final-agg'` where an aggregation is performed before evaluating on the validation set and test set (on last mini-batch of each epoch) for mitigating impact when the very last subset on which the model is trained is of low quality, or corrupted, or just detrimental to the model performance.
@@ -361,7 +361,7 @@ There are several parameters influencing how the collaborative and distributed l
361361
- "Federated SBS linear"
362362
- "Federated SBS quadratic"
363363
- "Federated SBS constant"
364-
- "LFlip"
364+
- "Smodel"
365365
- "PVRL"
366366
```
367367

mplc/multi_partner_learning.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,9 +604,9 @@ def fit_minibatch(self):
604604
logger.debug("End of S-Model collaborative round.")
605605

606606

607-
class GradientsAverage(MultiPartnerLearning):
607+
class FederatedGradients(MultiPartnerLearning):
608608
def __init__(self, scenario, **kwargs):
609-
super(GradientsAverage, self).__init__(scenario, **kwargs)
609+
super(FederatedGradients, self).__init__(scenario, **kwargs)
610610
if self.partners_count == 1:
611611
raise ValueError('Only one partner is provided. Please use the dedicated SinglePartnerLearning class')
612612
self.model = self.build_model()
@@ -667,9 +667,10 @@ def fit_minibatch(self):
667667

668668
MULTI_PARTNER_LEARNING_APPROACHES = {
669669
"fedavg": FederatedAverageLearning,
670+
'fedgrads': FederatedGradients,
670671
"seq-pure": SequentialLearning,
671672
"seq-with-final-agg": SequentialWithFinalAggLearning,
672673
"seqavg": SequentialAverageLearning,
673-
"lflip": MplSModel,
674-
'gradsavg': GradientsAverage
674+
"smodel": MplSModel,
675+
675676
}

0 commit comments

Comments
 (0)