langgraph: allow tools to return Command in tool node #1189
Triggered via pull request
December 10, 2024 03:33
Status
Success
Total duration
50m 34s
Artifacts
–
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: 63.8 ms +- 1.8 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 54.2 ms +- 1.0 ms
.........................................
WARNING: the benchmark result may be unstable
* the standard deviation (10.5 ms) is 11% of the mean (98.6 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: 98.6 ms +- 10.5 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 98.0 ms +- 1.2 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 705 ms +- 17 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 532 ms +- 17 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 1.08 sec +- 0.03 sec
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 996 ms +- 26 ms
.........................................
react_agent_10x: Mean +- std dev: 31.8 ms +- 0.7 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 23.3 ms +- 0.4 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 48.5 ms +- 0.9 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 37.9 ms +- 0.7 ms
.........................................
react_agent_100x: Mean +- std dev: 357 ms +- 9 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 280 ms +- 5 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 1000 ms +- 18 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 889 ms +- 14 ms
.........................................
wide_state_25x300: Mean +- std dev: 24.3 ms +- 0.5 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 15.4 ms +- 0.2 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 295 ms +- 19 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 281 ms +- 19 ms
.........................................
wide_state_15x600: Mean +- std dev: 28.1 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.8 ms +- 0.2 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 498 ms +- 21 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 480 ms +- 19 ms
.........................................
wide_state_9x1200: Mean +- std dev: 28.2 ms +- 0.5 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.8 ms +- 0.2 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 330 ms +- 19 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 313 ms +- 18 ms
|
Comparison against main:
libs/langgraph/langgraph/prebuilt/tool_node.py#L1
+-----------------------------------------+---------+------------------------+
| Benchmark | main | changes |
+=========================================+=========+========================+
| wide_state_15x600_checkpoint_sync | 475 ms | 480 ms: 1.01x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_9x1200_checkpoint_sync | 307 ms | 313 ms: 1.02x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_25x300_checkpoint_sync | 275 ms | 281 ms: 1.02x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_15x600 | 27.5 ms | 28.1 ms: 1.02x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_15x600_checkpoint | 487 ms | 498 ms: 1.02x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_25x300_checkpoint | 287 ms | 295 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_25x300 | 23.6 ms | 24.3 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_100x_sync | 272 ms | 280 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_9x1200_checkpoint | 321 ms | 330 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_9x1200 | 27.4 ms | 28.2 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_15x600_sync | 17.3 ms | 17.8 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_9x1200_sync | 17.3 ms | 17.8 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_10x | 30.8 ms | 31.8 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_10x_sync | 22.6 ms | 23.3 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| wide_state_25x300_sync | 14.9 ms | 15.4 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_10x | 61.7 ms | 63.8 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_100x | 345 ms | 357 ms: 1.03x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_10x_checkpoint | 46.7 ms | 48.5 ms: 1.04x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 94.4 ms | 98.0 ms: 1.04x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_100x_sync | 511 ms | 532 ms: 1.04x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_10x_sync | 52.0 ms | 54.2 ms: 1.04x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_10x_checkpoint_sync | 36.4 ms | 37.9 ms: 1.04x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_100x_checkpoint_sync | 944 ms | 996 ms: 1.05x slower |
+-----------------------------------------+---------+------------------------+
| fanout_to_subgraph_10x_checkpoint | 93.3 ms | 98.6 ms: 1.06x slower |
+-----------------------------------------+---------+------------------------+
| react_agent_100x_checkpoint_sync | 828 ms | 889 ms: 1.07x
|