lib: In calls to get_state apply pending writes #727
Annotations
1 warning and 2 notices
benchmark
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Benchmark results:
libs/langgraph/langgraph/pregel/__init__.py#L1
.........................................
fanout_to_subgraph_10x: Mean +- std dev: 57.8 ms +- 1.8 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 48.9 ms +- 0.7 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 83.2 ms +- 1.5 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 91.1 ms +- 1.0 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 543 ms +- 14 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 478 ms +- 6 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 886 ms +- 32 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 898 ms +- 19 ms
.........................................
react_agent_10x: Mean +- std dev: 30.2 ms +- 0.6 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.0 ms +- 0.2 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 46.3 ms +- 1.1 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 36.0 ms +- 0.6 ms
.........................................
react_agent_100x: Mean +- std dev: 337 ms +- 6 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 269 ms +- 3 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 935 ms +- 11 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 835 ms +- 9 ms
.........................................
wide_state_25x300: Mean +- std dev: 23.3 ms +- 0.4 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 14.7 ms +- 0.1 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 277 ms +- 4 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 265 ms +- 4 ms
.........................................
wide_state_15x600: Mean +- std dev: 27.2 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.0 ms +- 0.2 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 478 ms +- 5 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 464 ms +- 6 ms
.........................................
wide_state_9x1200: Mean +- std dev: 27.2 ms +- 0.6 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.1 ms +- 0.4 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 311 ms +- 3 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 297 ms +- 4 ms
|
Comparison against main:
libs/langgraph/langgraph/pregel/__init__.py#L1
+-----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+=========================================+=========+=======================+
| fanout_to_subgraph_10x_checkpoint | 85.3 ms | 83.2 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 957 ms | 935 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint_sync | 853 ms | 835 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 49.7 ms | 48.9 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 316 ms | 311 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600_checkpoint_sync | 469 ms | 464 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint_sync | 300 ms | 297 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_sync | 17.2 ms | 17.1 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600_checkpoint | 482 ms | 478 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint_sync | 905 ms | 898 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300_checkpoint_sync | 267 ms | 265 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_sync | 22.2 ms | 22.0 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300_checkpoint | 279 ms | 277 ms: 1.00x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 474 ms | 478 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x | 57.4 ms | 57.8 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 23.1 ms | 23.3 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600 | 26.9 ms | 27.2 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x | 534 ms | 543 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.00x faster |
+-----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (10): react_agent_10x, react_agent_100x_sync, react_agent_10x_checkpoint_sync, wide_state_9x1200, wide_state_25x300_sync, fanout_to_subgraph_10x_checkpoint_sync, react_agent_10x_checkpoint, react_agent_100x, wide_state_15x600_sync, fanout_to_subgraph_100x_checkpoint
|