Execute the Burr application with the given initial state. Args: initial_state (dict): The initial state to pass to the Burr application. Returns: dict: The final state of the Burr application.
(self, initial_state: Dict[str, Any] = {})
| 209 | return state |
| 210 | |
| 211 | def execute(self, initial_state: Dict[str, Any] = {}) -> Dict[str, Any]: |
| 212 | """ |
| 213 | Execute the Burr application with the given initial state. |
| 214 | |
| 215 | Args: |
| 216 | initial_state (dict): The initial state to pass to the Burr application. |
| 217 | |
| 218 | Returns: |
| 219 | dict: The final state of the Burr application. |
| 220 | """ |
| 221 | |
| 222 | self.burr_app = self._initialize_burr_app(initial_state) |
| 223 | |
| 224 | # TODO: to fix final nodes detection |
| 225 | final_nodes = [self.burr_app.graph.actions[-1].name] |
| 226 | |
| 227 | last_action, result, final_state = self.burr_app.run( |
| 228 | halt_after=final_nodes, inputs=self.burr_inputs |
| 229 | ) |
| 230 | |
| 231 | return self._convert_state_from_burr(final_state) |
no test coverage detected