Skip to content

Commit

Permalink
print graph on each agent step
Browse files Browse the repository at this point in the history
  • Loading branch information
alanalanlu committed Nov 21, 2024
1 parent 036ef11 commit d48148e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integuru/graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ def check_end_condition(state, agent, to_generate_code):
agent.dag_manager.detect_cycles()

if len(state.get("to_be_processed_nodes", [])) == 0:
print("------------------------Successfully analyzed!!!-------------------------------", flush=True)
print_dag(agent.dag_manager.graph, agent.global_master_node_id)
visualize_dag(agent.dag_manager.graph)
print("------------------------Successfully analyzed!!!-------------------------------", flush=True)
print_dag_in_reverse(agent.dag_manager.graph, to_generate_code=to_generate_code)
return "end"
else:
print("Continuing execution", flush=True)
print(f"Generated graph at current step: {print_dag(agent.dag_manager.graph, agent.global_master_node_id)}", flush=True)
return "continue"


Expand Down

0 comments on commit d48148e

Please sign in to comment.