checkpoint: Add option to use persistent dict for in-memory checkpointer #859
Triggered via pull request
November 17, 2024 01:35
Status
Success
Total duration
47m 27s
Artifacts
–
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/checkpoint/langgraph/checkpoint/memory/__init__.py#L1
.........................................
fanout_to_subgraph_10x: Mean +- std dev: 61.3 ms +- 1.5 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 51.4 ms +- 0.8 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 92.1 ms +- 8.2 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 94.3 ms +- 0.9 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 605 ms +- 24 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 502 ms +- 5 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 943 ms +- 46 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 923 ms +- 17 ms
.........................................
react_agent_10x: Mean +- std dev: 30.7 ms +- 0.8 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.4 ms +- 0.3 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 46.8 ms +- 0.9 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 36.7 ms +- 0.5 ms
.........................................
react_agent_100x: Mean +- std dev: 342 ms +- 6 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 271 ms +- 4 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 942 ms +- 11 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 839 ms +- 9 ms
.........................................
wide_state_25x300: Mean +- std dev: 24.2 ms +- 0.4 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 15.5 ms +- 0.1 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 279 ms +- 4 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 266 ms +- 5 ms
.........................................
wide_state_15x600: Mean +- std dev: 28.2 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.8 ms +- 0.2 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 477 ms +- 3 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 465 ms +- 8 ms
.........................................
wide_state_9x1200: Mean +- std dev: 28.1 ms +- 0.5 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.8 ms +- 0.2 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 312 ms +- 3 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 298 ms +- 4 ms
|
Comparison against main:
libs/checkpoint/langgraph/checkpoint/memory/__init__.py#L1
+----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+========================================+=========+=======================+
| wide_state_15x600_checkpoint | 482 ms | 477 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 950 ms | 942 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint_sync | 846 ms | 839 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 314 ms | 312 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint_sync | 300 ms | 298 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200 | 28.3 ms | 28.1 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_10x_sync | 22.3 ms | 22.4 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 51.2 ms | 51.4 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| react_agent_100x | 340 ms | 342 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint_sync | 36.5 ms | 36.7 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_15x600_sync | 17.7 ms | 17.8 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 93.7 ms | 94.3 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 24.0 ms | 24.2 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 497 ms | 502 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300_sync | 15.4 ms | 15.5 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.00x slower |
+----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (13): fanout_to_subgraph_100x_checkpoint, wide_state_9x1200_sync, fanout_to_subgraph_100x, wide_state_25x300_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_15x600_checkpoint_sync, fanout_to_subgraph_10x_checkpoint, react_agent_100x_sync, react_agent_10x, wide_state_15x600, fanout_to_subgraph_100x_checkpoint_sync, react_agent_10x_checkpoint, fanout_to_subgraph_10x
|