Skip to content

langgraph: allow tools to return Command in tool node #1190

langgraph: allow tools to return Command in tool node

langgraph: allow tools to return Command in tool node #1190

Triggered via pull request December 10, 2024 03:34
Status Success
Total duration 48m 17s
Artifacts

bench.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

1 warning and 2 notices
benchmark
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Benchmark results: libs/langgraph/langgraph/prebuilt/tool_node.py#L1
......................................... fanout_to_subgraph_10x: Mean +- std dev: 62.5 ms +- 1.7 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 53.1 ms +- 0.6 ms ......................................... fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 95.2 ms +- 8.3 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 97.4 ms +- 1.8 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 655 ms +- 17 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 520 ms +- 10 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 1.02 sec +- 0.05 sec ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 969 ms +- 20 ms ......................................... react_agent_10x: Mean +- std dev: 31.2 ms +- 0.6 ms ......................................... react_agent_10x_sync: Mean +- std dev: 23.0 ms +- 0.3 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 47.3 ms +- 0.9 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 37.0 ms +- 0.4 ms ......................................... react_agent_100x: Mean +- std dev: 347 ms +- 6 ms ......................................... react_agent_100x_sync: Mean +- std dev: 275 ms +- 3 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 959 ms +- 14 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 856 ms +- 11 ms ......................................... wide_state_25x300: Mean +- std dev: 24.0 ms +- 0.4 ms ......................................... wide_state_25x300_sync: Mean +- std dev: 15.1 ms +- 0.2 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 293 ms +- 16 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 282 ms +- 18 ms ......................................... wide_state_15x600: Mean +- std dev: 28.0 ms +- 0.6 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 17.5 ms +- 0.2 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 496 ms +- 16 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 480 ms +- 15 ms ......................................... wide_state_9x1200: Mean +- std dev: 27.8 ms +- 0.9 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 17.5 ms +- 0.1 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 324 ms +- 15 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 310 ms +- 14 ms
Comparison against main: libs/langgraph/langgraph/prebuilt/tool_node.py#L1
+-----------------------------------------+---------+------------------------+ | Benchmark | main | changes | +=========================================+=========+========================+ | react_agent_100x | 345 ms | 347 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_15x600_checkpoint_sync | 475 ms | 480 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | react_agent_100x_sync | 272 ms | 275 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_9x1200_sync | 17.3 ms | 17.5 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | react_agent_10x_checkpoint | 46.7 ms | 47.3 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | react_agent_10x | 30.8 ms | 31.2 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_25x300_sync | 14.9 ms | 15.1 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_10x | 61.7 ms | 62.5 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_15x600_sync | 17.3 ms | 17.5 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_9x1200 | 27.4 ms | 27.8 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | react_agent_10x_sync | 22.6 ms | 23.0 ms: 1.01x slower | +-----------------------------------------+---------+------------------------+ | wide_state_25x300 | 23.6 ms | 24.0 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | react_agent_10x_checkpoint_sync | 36.4 ms | 37.0 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_100x_sync | 511 ms | 520 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | wide_state_25x300_checkpoint | 287 ms | 293 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | wide_state_15x600 | 27.5 ms | 28.0 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | wide_state_15x600_checkpoint | 487 ms | 496 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_10x_sync | 52.0 ms | 53.1 ms: 1.02x slower | +-----------------------------------------+---------+------------------------+ | wide_state_25x300_checkpoint_sync | 275 ms | 282 ms: 1.03x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_100x_checkpoint_sync | 944 ms | 969 ms: 1.03x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 94.4 ms | 97.4 ms: 1.03x slower | +-----------------------------------------+---------+------------------------+ | react_agent_100x_checkpoint_sync | 828 ms | 856 ms: 1.03x slower | +-----------------------------------------+---------+------------------------+ | react_agent_100x_checkpoint | 927 ms | 959 ms: 1.03x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_100x | 615 ms | 655 ms: 1.07x slower | +-----------------------------------------+---------+------------------------+ | fanout_to_subgraph_100x_checkpoint | 942 ms | 1.02 sec: 1.0