Skip to content

Commit d48148e

Browse files
committed
print graph on each agent step
1 parent 036ef11 commit d48148e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integuru/graph_builder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ def check_end_condition(state, agent, to_generate_code):
88
agent.dag_manager.detect_cycles()
99

1010
if len(state.get("to_be_processed_nodes", [])) == 0:
11+
print("------------------------Successfully analyzed!!!-------------------------------", flush=True)
1112
print_dag(agent.dag_manager.graph, agent.global_master_node_id)
1213
visualize_dag(agent.dag_manager.graph)
13-
print("------------------------Successfully analyzed!!!-------------------------------", flush=True)
1414
print_dag_in_reverse(agent.dag_manager.graph, to_generate_code=to_generate_code)
1515
return "end"
1616
else:
1717
print("Continuing execution", flush=True)
18+
print(f"Generated graph at current step: {print_dag(agent.dag_manager.graph, agent.global_master_node_id)}", flush=True)
1819
return "continue"
1920

2021

0 commit comments

Comments
 (0)