diff --git a/eval/main.ipynb b/eval/main.ipynb index 2f23eeaa7c6ecd1ccb76a7480a7050628a335248..e25d47c9107b447f051a8d13143ee105a490b900 100644 --- a/eval/main.ipynb +++ b/eval/main.ipynb @@ -3724,7 +3724,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.9" + "version": "3.9.7" }, "orig_nbformat": 4 }, diff --git a/src/decentralizepy/sharing/PartialModel.py b/src/decentralizepy/sharing/PartialModel.py index 0836d786e838c64220e30ad096d677c549837fbf..52e002e6d8ce304453e1598f3cba16caade44121 100644 --- a/src/decentralizepy/sharing/PartialModel.py +++ b/src/decentralizepy/sharing/PartialModel.py @@ -41,14 +41,13 @@ class PartialModel(Sharing): model : decentralizepy.models.Model Model to train dataset : decentralizepy.datasets.Dataset - Dataset for sharing data. Not implemented yer! TODO + Dataset for sharing data. Not implemented yet! TODO log_dir : str Location to write shared_params (only writing for 2 procs per machine) """ super().__init__( - rank, machine_id, communication, mapping, graph, model, dataset + rank, machine_id, communication, mapping, graph, model, dataset, log_dir ) - self.log_dir = log_dir self.alpha = alpha self.dict_ordered = dict_ordered self.save_shared = save_shared diff --git a/src/decentralizepy/sharing/Sharing.py b/src/decentralizepy/sharing/Sharing.py index 25167ff3cf3440565a6ac952e14a6ba240bdb2ef..c8ef9f1d5c5e95dc526d0ac74fee0768c45e78e7 100644 --- a/src/decentralizepy/sharing/Sharing.py +++ b/src/decentralizepy/sharing/Sharing.py @@ -11,7 +11,9 @@ class Sharing: API defining who to share with and what, and what to do on receiving """ - def __init__(self, rank, machine_id, communication, mapping, graph, model, dataset): + def __init__( + self, rank, machine_id, communication, mapping, graph, model, dataset, log_dir + ): """ Constructor Parameters @@ -42,6 +44,7 @@ class Sharing: self.model = model self.dataset = dataset self.communication_round = 0 + self.log_dir = log_dir self.peer_deques = dict() my_neighbors = self.graph.neighbors(self.uid)