From dced6d9bee46483cdbd3343bd12da73288513bee Mon Sep 17 00:00:00 2001 From: Victoria Date: Wed, 4 Sep 2024 21:17:24 +0200 Subject: [PATCH] Attempt to fix the build fail. Reverting with next commit if unsucccessful --- dgl_ptm/dgl_ptm/model/data_collection.py | 3 ++- dgl_ptm/dgl_ptm/model/initialize_model.py | 1 + dgl_ptm/dgl_ptm/model/step.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dgl_ptm/dgl_ptm/model/data_collection.py b/dgl_ptm/dgl_ptm/model/data_collection.py index a5bd33d..b6fc312 100644 --- a/dgl_ptm/dgl_ptm/model/data_collection.py +++ b/dgl_ptm/dgl_ptm/model/data_collection.py @@ -13,6 +13,7 @@ def data_collection(agent_graph, ndata=None, edata=None, format = 'xarray', + initial_only = None, mode = 'w-'): """data_collection - collects data from agents and edges. @@ -41,7 +42,7 @@ def data_collection(agent_graph, ndata = list(agent_graph.node_attr_schemes().keys() - ndata[1]) elif sum(1 for item in ndata if isinstance(item, list)) > 1: ndata_list = ndata - initial_only=[] + #initial_only=[] for specification in ndata_list: if specification == ['all']: raise ValueError('Use of "all" is not compatible with multiple data collection specification lists.') diff --git a/dgl_ptm/dgl_ptm/model/initialize_model.py b/dgl_ptm/dgl_ptm/model/initialize_model.py index b235c56..0ac5543 100644 --- a/dgl_ptm/dgl_ptm/model/initialize_model.py +++ b/dgl_ptm/dgl_ptm/model/initialize_model.py @@ -322,6 +322,7 @@ def initialize_model_properties(self): """ model_theta = self._initialize_model_theta() self.steering_parameters['modelTheta'] = model_theta + self.initial_only = [] #attachProb = self._initialize_attach_prob() #self.steering_parameters['attachProb'] = attachProb diff --git a/dgl_ptm/dgl_ptm/model/step.py b/dgl_ptm/dgl_ptm/model/step.py index eb0ccc2..18453f1 100644 --- a/dgl_ptm/dgl_ptm/model/step.py +++ b/dgl_ptm/dgl_ptm/model/step.py @@ -88,6 +88,7 @@ def ptm_step(agent_graph, device, timestep, params): epath = params['epath'], ndata = params['ndata'], edata = params['edata'], + initial_only = params['initial_only'], mode = params['mode'] ) return @@ -169,5 +170,6 @@ def ptm_step(agent_graph, device, timestep, params): epath = params['epath'], ndata = params['ndata'], edata = params['edata'], + initial_only = params['initial_only'], mode = params['mode'] )