langgraph: allow tools to return Command in tool node #1188
Triggered via pull request
December 10, 2024 03:18
Status
Success
Total duration
47m 54s
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.0 ms +- 1.8 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 53.7 ms +- 0.9 ms
.........................................
WARNING: the benchmark result may be unstable
* the standard deviation (10.8 ms) is 11% of the mean (99.2 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: 99.2 ms +- 10.8 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 97.1 ms +- 2.4 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 639 ms +- 15 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 519 ms +- 8 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 988 ms +- 51 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 962 ms +- 19 ms
.........................................
react_agent_10x: Mean +- std dev: 31.3 ms +- 0.8 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.9 ms +- 0.4 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 47.3 ms +- 1.3 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 37.0 ms +- 0.5 ms
.........................................
react_agent_100x: Mean +- std dev: 347 ms +- 7 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 275 ms +- 3 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 940 ms +- 11 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 858 ms +- 17 ms
.........................................
wide_state_25x300: Mean +- std dev: 24.0 ms +- 0.4 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 15.0 ms +- 0.1 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 287 ms +- 14 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 276 ms +- 14 ms
.........................................
wide_state_15x600: Mean +- std dev: 27.6 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.5 ms +- 0.1 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 489 ms +- 15 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 474 ms +- 14 ms
.........................................
wide_state_9x1200: Mean +- std dev: 27.7 ms +- 0.5 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.4 ms +- 0.2 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 323 ms +- 16 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 308 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_9x1200 | 27.4 ms | 27.7 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_sync | 17.3 ms | 17.4 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600_sync | 17.3 ms | 17.5 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300_sync | 14.9 ms | 15.0 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_sync | 272 ms | 275 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint | 46.7 ms | 47.3 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_sync | 22.6 ms | 22.9 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 23.6 ms | 24.0 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 927 ms | 940 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 511 ms | 519 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x | 30.8 ms | 31.3 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint_sync | 36.4 ms | 37.0 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint_sync | 944 ms | 962 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x | 61.7 ms | 63.0 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 94.4 ms | 97.1 ms: 1.03x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 52.0 ms | 53.7 ms: 1.03x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint_sync | 828 ms | 858 ms: 1.04x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x | 615 ms | 639 ms: 1.04x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint | 942 ms | 988 ms: 1.05x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint | 93.3 ms | 99.2 ms: 1.06x slower |
+-----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.02x slower |
+-----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (7): wide_state_15x600_checkpoint_sync, wide_state_25x300_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_15x600_checkpoint, wide_state_15x600, wide_state_9x1200_checkpoint_sync, wide_state_9x1200_checkpoint
|