sdk-py: Fix SSE parsing to split lines only \n \r , remove httpx-sse, fix missing decoder flush #1042
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/sdk-py/langgraph_sdk/client.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 +- 1.3 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 90.9 ms +- 7.6 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 92.8 ms +- 1.1 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 589 ms +- 22 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 500 ms +- 5 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 925 ms +- 40 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 914 ms +- 15 ms
.........................................
react_agent_10x: Mean +- std dev: 30.7 ms +- 0.6 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.3 ms +- 0.2 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 46.4 ms +- 0.7 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 36.2 ms +- 0.4 ms
.........................................
react_agent_100x: Mean +- std dev: 341 ms +- 6 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 271 ms +- 4 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 926 ms +- 8 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 829 ms +- 8 ms
.........................................
wide_state_25x300: Mean +- std dev: 24.0 ms +- 0.4 ms
.........................................
wide_state_25x300_sync: Mean +- std dev: 15.3 ms +- 0.1 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 277 ms +- 3 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 265 ms +- 6 ms
.........................................
wide_state_15x600: Mean +- std dev: 28.0 ms +- 0.4 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 17.7 ms +- 0.2 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 477 ms +- 8 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 461 ms +- 5 ms
.........................................
wide_state_9x1200: Mean +- std dev: 27.9 ms +- 0.4 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 17.7 ms +- 0.1 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 310 ms +- 3 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 296 ms +- 4 ms
|
Comparison against main:
libs/sdk-py/langgraph_sdk/client.py#L1
+----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+========================================+=========+=======================+
| fanout_to_subgraph_10x_checkpoint | 93.5 ms | 90.9 ms: 1.03x faster |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x | 62.0 ms | 61.1 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 52.0 ms | 51.3 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint_sync | 36.6 ms | 36.2 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 312 ms | 310 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 93.3 ms | 92.8 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_15x600_checkpoint_sync | 464 ms | 461 ms: 1.01x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_sync | 17.7 ms | 17.7 ms: 1.00x faster |
+----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint_sync | 297 ms | 296 ms: 1.00x faster |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_sync | 270 ms | 271 ms: 1.00x slower |
+----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 23.9 ms | 24.0 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint_sync | 823 ms | 829 ms: 1.01x slower |
+----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.00x faster |
+----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (16): fanout_to_subgraph_100x, wide_state_25x300_checkpoint_sync, fanout_to_subgraph_100x_checkpoint, wide_state_25x300_sync, wide_state_25x300_checkpoint, react_agent_10x_checkpoint, fanout_to_subgraph_100x_checkpoint_sync, react_agent_10x_sync, wide_state_15x600_sync, wide_state_15x600, fanout_to_subgraph_100x_sync, react_agent_10x, react_agent_100x_checkpoint, wide_state_15x600_checkpoint, wide_state_9x1200, react_agent_100x
|