Browse Source

fix: AttributeError

shellmiao 1 year ago
parent
commit
ccc3919428
2 changed files with 4 additions and 4 deletions
  1. 2 2
      applications/fedssl/client.py
  2. 2 2
      applications/fedssl/client_with_pgfed.py

+ 2 - 2
applications/fedssl/client.py

@@ -22,8 +22,8 @@ L2 = "l2"
 
 
 class FedSSLClient(BaseClient):
-    def __init__(self, cid, conf, train_data, test_data, device, sleep_time=0):
-        super(FedSSLClient, self).__init__(cid, conf, train_data, test_data, device, sleep_time)
+    def __init__(self, id, cid, conf, train_data, test_data, device, sleep_time=0):
+        super(FedSSLClient, self).__init__(id, cid, conf, train_data, test_data, device, sleep_time)
         self._local_model = None
         self.DAPU_predictor = LOCAL
         self.encoder_distance = 1

+ 2 - 2
applications/fedssl/client_with_pgfed.py

@@ -33,8 +33,8 @@ def model_dot_product(w1, w2, requires_grad=True):
     return dot_product
 
 class FedSSLWithPgFedClient(FedSSLClient):
-    def __init__(self, cid, conf, train_data, test_data, device, sleep_time=0):
-        super(FedSSLWithPgFedClient, self).__init__(cid, conf, train_data, test_data, device, sleep_time)
+    def __init__(self, id, cid, conf, train_data, test_data, device, sleep_time=0):
+        super(FedSSLWithPgFedClient, self).__init__(id, cid, conf, train_data, test_data, device, sleep_time)
         self._local_model = None
         self.DAPU_predictor = LOCAL
         self.encoder_distance = 1