Skip to content

checkpoint: Add option to use persistent dict for in-memory checkpointer #861

checkpoint: Add option to use persistent dict for in-memory checkpointer

checkpoint: Add option to use persistent dict for in-memory checkpointer #861

Triggered via pull request November 17, 2024 01:42
Status Success
Total duration 46m 37s
Artifacts

bench.yml

on: pull_request
Fit to window
Zoom out
Zoom in

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.1 ms +- 1.8 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 51.3 ms +- 0.7 ms ......................................... fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 91.4 ms +- 8.2 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 93.3 ms +- 0.8 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 596 ms +- 26 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 499 ms +- 5 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 917 ms +- 38 ms ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 915 ms +- 16 ms ......................................... react_agent_10x: Mean +- std dev: 30.7 ms +- 0.7 ms ......................................... react_agent_10x_sync: Mean +- std dev: 22.3 ms +- 0.2 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 46.6 ms +- 0.8 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 36.5 ms +- 0.5 ms ......................................... react_agent_100x: Mean +- std dev: 341 ms +- 7 ms ......................................... react_agent_100x_sync: Mean +- std dev: 269 ms +- 4 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 927 ms +- 9 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 827 ms +- 8 ms ......................................... wide_state_25x300: Mean +- std dev: 24.1 ms +- 0.4 ms ......................................... wide_state_25x300_sync: Mean +- std dev: 15.4 ms +- 0.1 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 276 ms +- 3 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 265 ms +- 3 ms ......................................... wide_state_15x600: Mean +- std dev: 28.1 ms +- 0.6 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 17.7 ms +- 0.1 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 477 ms +- 7 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 461 ms +- 5 ms ......................................... wide_state_9x1200: Mean +- std dev: 28.0 ms +- 0.5 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 17.7 ms +- 0.1 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 312 ms +- 5 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 297 ms +- 4 ms
Comparison against main: libs/checkpoint/langgraph/checkpoint/memory/__init__.py#L1
+-----------------------------------------+---------+-----------------------+ | Benchmark | main | changes | +=========================================+=========+=======================+ | fanout_to_subgraph_100x_checkpoint | 951 ms | 917 ms: 1.04x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint | 950 ms | 927 ms: 1.03x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint_sync | 846 ms | 827 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x | 606 ms | 596 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600_checkpoint | 482 ms | 477 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_checkpoint_sync | 300 ms | 297 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_25x300_checkpoint | 279 ms | 276 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200 | 28.3 ms | 28.0 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_sync | 17.9 ms | 17.7 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_checkpoint | 314 ms | 312 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600_checkpoint_sync | 464 ms | 461 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_sync | 271 ms | 269 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_checkpoint_sync | 920 ms | 915 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 93.7 ms | 93.3 ms: 1.00x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_25x300_checkpoint_sync | 266 ms | 265 ms: 1.00x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_sync | 497 ms | 499 ms: 1.00x slower | +-----------------------------------------+---------+-----------------------+ | Geometric mean | (ref) | 1.01x faster | +-----------------------------------------+---------+-----------------------+ Benchmark hidden because not significant (12): fanout_to_subgraph_10x_checkpoint, wide_state_15x600, react_agent_10x_sync, wide_state_15x600_sync, wide_state_25x300_sync, react_agent_10x_checkpoint_sync, react_agent_10x, react_agent_10x_checkpoint, react_agent_100x, fanout_to_subgraph_10x_sync, fanout_to_subgraph_10x, wide_state_25x300