Skip to content

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

langgraph: allow tools to return Command in tool node

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

Triggered via pull request December 10, 2024 01:13
Status Success
Total duration 47m 9s
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: 61.8 ms +- 1.3 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 52.9 ms +- 1.3 ms ......................................... WARNING: the benchmark result may be unstable * the standard deviation (10.3 ms) is 11% of the mean (96.5 ms) Try to rerun the benchmark with more runs, values and/or loops. Run 'python -m pyperf system tune' command to reduce the system jitter. Use pyperf stats, pyperf dump and pyperf hist to analyze results. Use --quiet option to hide these warnings. fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 96.5 ms +- 10.3 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 94.3 ms +- 1.1 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 634 ms +- 30 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 518 ms +- 13 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 998 ms +- 63 ms ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 967 ms +- 25 ms ......................................... react_agent_10x: Mean +- std dev: 30.8 ms +- 0.7 ms ......................................... react_agent_10x_sync: Mean +- std dev: 22.7 ms +- 0.3 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 46.7 ms +- 1.3 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 37.0 ms +- 0.6 ms ......................................... react_agent_100x: Mean +- std dev: 344 ms +- 7 ms ......................................... react_agent_100x_sync: Mean +- std dev: 272 ms +- 4 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 967 ms +- 31 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 851 ms +- 30 ms ......................................... wide_state_25x300: Mean +- std dev: 23.5 ms +- 0.4 ms ......................................... wide_state_25x300_sync: Mean +- std dev: 14.9 ms +- 0.2 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 290 ms +- 17 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 274 ms +- 14 ms ......................................... wide_state_15x600: Mean +- std dev: 27.5 ms +- 0.5 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 17.4 ms +- 0.2 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 489 ms +- 16 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 473 ms +- 16 ms ......................................... wide_state_9x1200: Mean +- std dev: 27.6 ms +- 0.8 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 17.3 ms +- 0.4 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 321 ms +- 16 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 308 ms +- 15 ms
Comparison against main: libs/langgraph/langgraph/prebuilt/tool_node.py#L1
+-----------------------------------------+---------+-----------------------+ | Benchmark | main | changes | +=========================================+=========+=======================+ | wide_state_25x300_checkpoint_sync | 279 ms | 274 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600_checkpoint_sync | 481 ms | 473 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 95.8 ms | 94.3 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_checkpoint_sync | 312 ms | 308 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600_checkpoint | 495 ms | 489 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_25x300 | 23.8 ms | 23.5 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_sync | 275 ms | 272 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x_sync | 22.9 ms | 22.7 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x | 62.3 ms | 61.8 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x | 31.1 ms | 30.8 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_25x300_sync | 15.0 ms | 14.9 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x_checkpoint | 47.1 ms | 46.7 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_sync | 17.4 ms | 17.3 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x | 346 ms | 344 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_sync | 516 ms | 518 ms: 1.01x slower | +-----------------------------------------+---------+-----------------------+ | react_agent_10x_checkpoint_sync | 36.8 ms | 37.0 ms: 1.01x slower | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_checkpoint_sync | 956 ms | 967 ms: 1.01x slower | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint_sync | 833 ms | 851 ms: 1.02x slower | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x | 619 ms | 634 ms: 1.03x slower | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint | 93.6 ms | 96.5 ms: 1.03x slower | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint | 936 ms | 967 ms: 1.03x slower | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_checkpoint | 939 ms | 998 ms: 1.06x slower | +-----------------------------------------+---------+-----------------------+ | Geometric mean | (ref) | 1.00x slower | +-----------------------------------------+---------+-----------------------+ Benchmark hidden because not significant (6): wide_state_9x1200_checkpoint, wide_state_25x300_checkpoint, wide_state_9x1200, wide_state_15x600, wide_state_15x600_sync, fanout_to_subgraph_10x_sync