Skip to content

Commit 1cee912

Browse files
Reorder role behavior initialization in engine.py
1 parent c9f9673 commit 1cee912

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

nebula/core/engine.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,6 @@ def __init__(
117117
self._secure_neighbors = []
118118
self._is_malicious = self.config.participant["adversarial_args"]["attack_params"]["attacks"] != "No Attack"
119119

120-
role = config.participant["device_args"]["role"]
121-
self._role_behavior: RoleBehavior = factory_role_behavior(role, self, config)
122-
self._role_behavior_performance_lock = Locker("role_behavior_performance_lock", async_lock=True)
123-
124-
print_msg_box(
125-
msg=f"Name {self.name}\nRole: {self._role_behavior.get_role_name()}",
126-
indent=2,
127-
title="Node information",
128-
)
129-
130120
msg = f"Trainer: {self._trainer.__class__.__name__}"
131121
msg += f"\nDataset: {self.config.participant['data_args']['dataset']}"
132122
msg += f"\nIID: {self.config.participant['data_args']['iid']}"
@@ -149,6 +139,16 @@ def __init__(
149139

150140
self._cm = CommunicationsManager(engine=self)
151141

142+
role = config.participant["device_args"]["role"]
143+
self._role_behavior: RoleBehavior = factory_role_behavior(role, self, config)
144+
self._role_behavior_performance_lock = Locker("role_behavior_performance_lock", async_lock=True)
145+
146+
print_msg_box(
147+
msg=f"Name {self.name}\nRole: {self._role_behavior.get_role_name()}",
148+
indent=2,
149+
title="Node information",
150+
)
151+
152152
self._reporter = Reporter(config=self.config, trainer=self.trainer)
153153

154154
self._sinchronized_status = True

0 commit comments

Comments
 (0)