From 68e38e9f0fa48032f1aa76035d63ecf1cf8a00df Mon Sep 17 00:00:00 2001
From: Rishi Sharma <rishi.sharma@epfl.ch>
Date: Thu, 20 Jan 2022 13:26:42 +0100
Subject: [PATCH] GradientAccumulator migration to steps

---
 src/decentralizepy/training/GradientAccumulator.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/decentralizepy/training/GradientAccumulator.py b/src/decentralizepy/training/GradientAccumulator.py
index 5022308..31d39e2 100644
--- a/src/decentralizepy/training/GradientAccumulator.py
+++ b/src/decentralizepy/training/GradientAccumulator.py
@@ -5,7 +5,14 @@ from decentralizepy.training.Training import Training
 
 class GradientAccumulator(Training):
     def __init__(
-        self, model, optimizer, loss, rounds="", full_epochs="", batch_size="", shuffle=""
+        self,
+        model,
+        optimizer,
+        loss,
+        rounds="",
+        full_epochs="",
+        batch_size="",
+        shuffle="",
     ):
         """
         Constructor
@@ -24,7 +31,9 @@ class GradientAccumulator(Training):
         shuffle : bool
             True if the dataset should be shuffled before training.
         """
-        super().__init__(model, optimizer, loss, rounds, full_epochs, batch_size, shuffle)
+        super().__init__(
+            model, optimizer, loss, rounds, full_epochs, batch_size, shuffle
+        )
 
     def trainstep(self, data, target):
         """
-- 
GitLab