Execute one node step.
(self, outer_env:dict[str,object]|None=None)
| 265 | in_edge.open() |
| 266 | @masf_hook(Hook.EXECUTE) |
| 267 | def execute(self, outer_env:dict[str,object]|None=None): |
| 268 | """Execute one node step.""" |
| 269 | self._update_gate_state() |
| 270 | if self.gate == Gate.OPEN: |
| 271 | self._pull_attributes(outer_env) |
| 272 | input:dict = self._message_aggregate_in() |
| 273 | output:dict = self._forward(input) |
| 274 | self._update_gate_state() |
| 275 | # Always push output to local attributes, even if there are no out_edges |
| 276 | # This ensures that _attributes_push_outer can push the correct data to outer_env |
| 277 | self._attributes_push_local(output) |
| 278 | self._attributes_push_outer(outer_env, self._attributes_store) |
| 279 | if self.gate == Gate.CLOSED: |
| 280 | self._close_out_edges() |
| 281 | return |
| 282 | self._message_dispatch_out(output) |
| 283 | |
| 284 | else: |
| 285 | self._close_out_edges() |
| 286 | self._reset_gate_state() |
| 287 | |
| 288 | @abstractmethod |
| 289 | @masf_hook(Hook.FORWARD) |
nothing calls this directly
no test coverage detected