Attach Visualizer runtime hooks to a built RootGraph. This should be called once after the graph is fully built (nodes/edges exist), so we don't need to re-register hooks per-invocation.
(self, root_graph: object)
| 69 | |
| 70 | # Graph lifecycle APIs for framework internals. |
| 71 | def attach_graph(self, root_graph: object) -> None: |
| 72 | """ |
| 73 | Attach Visualizer runtime hooks to a built RootGraph. |
| 74 | |
| 75 | This should be called once after the graph is fully built (nodes/edges exist), |
| 76 | so we don't need to re-register hooks per-invocation. |
| 77 | """ |
| 78 | try: |
| 79 | from .runtime_hooks import install_root_graph_runtime_hooks |
| 80 | |
| 81 | self.set_active_graph(root_graph) |
| 82 | install_root_graph_runtime_hooks(root_graph, self) |
| 83 | except Exception: |
| 84 | return |
| 85 | |
| 86 | def begin_run(self, root_graph: object, *, input: dict[str, object] | None = None) -> None: |
| 87 | """ |
no test coverage detected