lib: Enforce write application order in apply_writes #732
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: 58.4 ms +- 1.6 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 49.3 ms +- 0.7 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 83.4 ms +- 1.5 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 92.0 ms +- 1.6 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 538 ms +- 12 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 479 ms +- 5 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 869 ms +- 45 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 900 ms +- 19 ms
.........................................
react_agent_10x: Mean +- std dev: 30.3 ms +- 0.6 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.1 ms +- 0.1 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 46.3 ms +- 0.9 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 36.3 ms +- 0.5 ms
.........................................
react_agent_100x: Mean +- std dev: 339 ms +- 6 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 270 ms +- 2 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 943 ms +- 12 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 838 ms +- 10 ms
.........................................
wide_state_25x300: Mean +- std dev: 23.2 ms +- 0.5 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 14.7 ms +- 0.2 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 279 ms +- 4 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 267 ms +- 4 ms
.........................................
wide_state_15x600: Mean +- std dev: 27.2 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.1 ms +- 0.1 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 482 ms +- 4 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 468 ms +- 7 ms
.........................................
wide_state_9x1200: Mean +- std dev: 26.9 ms +- 0.5 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.0 ms +- 0.1 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 314 ms +- 4 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 299 ms +- 4 ms
|
Comparison against main:
libs/langgraph/langgraph/pregel/__init__.py#L1
+----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+========================================+=========+=======================+
| react_agent_10x_checkpoint_sync | 37.0 ms | 36.3 ms: 1.02x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 23.4 ms | 23.2 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200 | 27.0 ms | 26.9 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_sync | 271 ms | 270 ms: 1.00x faster |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 477 ms | 479 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 938 ms | 943 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 91.3 ms | 92.0 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint | 82.8 ms | 83.4 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_15x600_sync | 17.0 ms | 17.1 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 48.9 ms | 49.3 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 311 ms | 314 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300_checkpoint | 276 ms | 279 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint_sync | 296 ms | 299 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_15x600_checkpoint | 476 ms | 482 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300_checkpoint_sync | 264 ms | 267 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_15x600_checkpoint_sync | 462 ms | 468 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.00x slower |
+----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (12): fanout_to_subgraph_100x_checkpoint, react_agent_10x_checkpoint, fanout_to_subgraph_100x, wide_state_25x300_sync, react_agent_10x_sync, wide_state_9x1200_sync, react_agent_100x_checkpoint_sync, wide_state_15x600, fanout_to_subgraph_100x_checkpoint_sync, react_agent_100x, react_agent_10x, fanout_to_subgraph_10x
|