Nuno Campos
2f3bd69bf5
Add pydantic benchmark
2025-03-18 16:12:34 -07:00
8d33938173
Improve documentation string for SqliteSaver ( #3857 )
...
* Document that `check_same_thread` as an option when creating sqlite
connection.
* Document why it's OK to do that.
---------
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
2025-03-18 21:29:05 +00:00
William FH and GitHub
1c73b1e45a
Schema coercer should never throw ( #3871 )
...
- pydantic will do that for us if needed
2025-03-18 14:17:08 -07:00
William FH and GitHub
465d5d648b
libs: pregel: find_subgraph_pregel: Do not cache introspection ( #3894 )
...
When searching for subgraphs stop caching inspection for the graph drawing & subgraph inference.
Fixes #3842
2025-03-18 14:09:55 -07:00
William Fu-Hinthorn
b751e8bcee
_evaluate() forward ref
2025-03-18 14:07:23 -07:00
Nuno Campos and GitHub
8ec3982056
Enable larger cases of sequential bench graph ( #3905 )
...
- Now that we're a lot faster on this case, we can enable some larger
test cases
2025-03-18 14:05:27 -07:00
William FH and GitHub
f17f264a7a
Merge branch 'main' into fix_subgraph_tools
2025-03-18 13:49:30 -07:00
William Fu-Hinthorn
086443472f
Drop cache
2025-03-18 13:46:41 -07:00
William Fu-Hinthorn
936e69404e
Revert "libs: pregel: find_subgraph_pregel: Do not search via introspection"
...
This reverts commit 2458f2d2e0 .
2025-03-18 13:43:08 -07:00
Nuno Campos
0e70b8d94f
Enable larger cases of sequential bench graph
...
- Now that we're a lot faster on this case, we can enable some larger test cases
2025-03-18 13:13:20 -07:00
Nuno Campos and GitHub
e1aa1a4510
0.3.15
2025-03-18 13:11:37 -07:00
William Fu-Hinthorn
ee650ab85f
Only throw if in union
2025-03-18 09:58:07 -07:00
Nuno Campos
7a959f62cc
Fix assertion
2025-03-18 09:54:20 -07:00
Nuno Campos
9b5549f759
Fix flaky assertion
2025-03-18 09:43:56 -07:00
Nuno Campos
fa96c0ac76
One more
2025-03-18 09:34:52 -07:00
Nuno Campos
98b8ff904c
Update test assertions for triggers
2025-03-18 09:30:29 -07:00
Nuno Campos
951131c8ec
Lint
2025-03-18 09:15:43 -07:00
Nuno Campos and Nuno Campos
8bcdba822e
Reduce to 4.1s
2025-03-18 09:15:28 -07:00
Nuno Campos and Nuno Campos
60fc49b448
Speed up prepare_single_task
...
- sequential(2000) goes from 8.4s to 4.7s
- replace UUID(str).bytes with simpler str.encode()
- find only the first active trigger, instead of the full list
- use a dedicated function for checking active trigger
2025-03-18 09:15:11 -07:00
Nuno Campos and GitHub
1d21b4ba08
Improve prepare_single_task trigger checks to linear complexity ( #3891 )
...
- Was O(n^2) due to individual channels created for every conditional
edge, including the default cond edge created for Command
- Now using a single channel per node for all conditional edge / command
triggers, reducing to linear complexity
- Improves run time on sequential(200) from 1.8s to 0.14s
2025-03-18 09:13:54 -07:00
Nuno Campos and GitHub
55ec0d3d2a
Speed up task triggers check ( #3890 )
...
- Using a sentinel value is faster than raising-catching an exception
2025-03-18 09:10:38 -07:00
Nuno Campos and GitHub
c7dd7be030
benchmarks: add sequential graph of a few hundred nodes ( #3882 )
...
Performance is poor due to state graph utilizing n^2 entries right now
to accommodate Command. Adding benchmark prior to updating
implementation.
2025-03-18 08:19:52 -07:00
Nuno Campos
47d38a3022
Replace get_catch w is_available
2025-03-18 08:19:22 -07:00
Nuno Campos
8e829f38af
Smaller sizes until we merge the fixes
2025-03-18 08:05:25 -07:00
Nuno Campos
3f241d00a3
Fix bench
2025-03-18 06:45:41 -07:00
blafab-hg
2458f2d2e0
libs: pregel: find_subgraph_pregel: Do not search via introspection
...
When searching for subgraphs do not attempt to search function non
locals for RunnableCallables as this captures unwanted reference to
surrounding variables.
2025-03-18 11:19:09 +01:00
Nuno Campos and GitHub
477a43dae0
Update pyproject.toml
2025-03-17 21:58:49 -07:00
Nuno Campos
d6a457ef1d
Improve prepare_single_task trigger checks to linear complexity
...
- Was O(n^2) due to individual channels created for every conditional edge, including the default cond edge created for Command
- Now using a single channel per node for all conditional edge / command triggers, reducing to linear complexity
- Improves run time on sequential(200) from 1.8s to 0.14s
2025-03-17 21:26:26 -07:00
Nuno Campos
ce1077da40
Speed up task triggers check
...
- Using a sentinel value is faster than raising-catching an exception
2025-03-17 21:04:05 -07:00
Nuno Campos
969958695a
Add time when running directly
2025-03-17 20:59:10 -07:00
Nuno Campos
dd16ae4ba5
When using global resume value, ensure subgraphs consume it
...
- Previously the global resume value was passed to subgraphs without being consumed
- This would result in two parallel subgraph calls being able to use the same resume value
- Note this behavior can't be implemented over the wire, that will be fixed in future PR
2025-03-17 20:31:54 -07:00
Nuno Campos
eae1faa656
Fix
2025-03-17 20:12:33 -07:00
Nuno Campos
1976d6584c
Lint
2025-03-17 20:00:33 -07:00
Nuno Campos
54e18445fc
Fix concurrency issue in PregelScratchpad.consume_null_resume
...
- Need to use a single operation to check if present and remove item from list
- This doesn't fix the separate issue that parallel tasks claiming a single interrupt value have somewhat undefined behavior (in the sense that they will race to be the first to take it). That will be fixed in a future PR
2025-03-17 19:53:03 -07:00
Nuno Campos
69dc29aaf9
0.3.13
2025-03-17 18:52:09 -07:00
Nuno Campos and GitHub
aa5ff74845
Fix missing interrupts in stream ( #3886 )
...
- When multiple parallel tasks and/or subgraphs emit interrupts some
were missing from stream output
2025-03-17 18:51:42 -07:00
Nuno Campos and GitHub
6049aaa842
Enable xray for remote graphs ( #3879 )
2025-03-17 18:49:51 -07:00
Nuno Campos
576aa1ca02
Order
2025-03-17 18:41:36 -07:00
Nuno Campos
e28e97d5e0
Lint
2025-03-17 18:39:13 -07:00
Nuno Campos
59e7c63c93
Lint
2025-03-17 18:38:37 -07:00
Nuno Campos
be7dee1c3b
Fix
2025-03-17 18:35:53 -07:00
Nuno Campos
0aafa04bac
WIP Fix missing interrupts in stream
...
- When multiple parallel tasks and/or subgraphs emit interrupts some were missing from stream output
2025-03-17 18:31:15 -07:00
Nuno Campos and GitHub
2e1adaa867
0.3.12
2025-03-17 16:56:34 -07:00
Nuno Campos and GitHub
3f8b165592
Update state.py
2025-03-17 16:56:09 -07:00
William Fu-Hinthorn
0b9adc28c3
langgraph-checkpoint 2.0.21
2025-03-17 15:15:29 -07:00
Eugene Yurtsev
80c3ccba7b
add benchmark
2025-03-17 16:45:02 -04:00
William FH and GitHub
d4255a0645
Merge branch 'main' into wfh/idempotency_test_
2025-03-17 13:27:12 -07:00
William Fu-Hinthorn
424f24720a
Make expires_at idempotent
2025-03-17 13:25:22 -07:00
William Fu-Hinthorn
2a71180c1d
Add tests for idempotency in migraionts
2025-03-17 12:43:21 -07:00
William Fu-Hinthorn
697f878e36
Make expires_at idempotent
2025-03-17 12:38:43 -07:00