Skip to content
Snippets Groups Projects
Commit 50507efb authored by Rishi Sharma's avatar Rishi Sharma
Browse files

log_dir moved to sharing

parent 7112e6e4
No related branches found
No related tags found
No related merge requests found
......@@ -3724,7 +3724,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.7"
},
"orig_nbformat": 4
},
......
......@@ -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
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment