Vadym Barda and GitHub
03be3b6567
docs: reorganize API refs ( #1884 )
2024-09-27 18:12:12 -04:00
Vadym Barda and GitHub
659d127d2b
checkpoint postgres,sqlite: update langgraph-checkpoint to 1.0.11 ( #1815 )
2024-09-23 22:09:28 +00:00
Vadym Barda and GitHub
7d513bcde2
checkpoint postgres,sqlite: update langgraph-checkpoint ( #1813 )
2024-09-23 21:47:26 +00:00
Vadym Barda and GitHub
515c619bc2
checkpoint postgres,sqlite: update version ( #1812 )
2024-09-23 17:33:19 -04:00
Nuno Campos
e71c24ea9b
Raise exception if sync method on async checkpointer is called from main thread
...
- The thread running the event loop can block waiting for a coro to run, only background threads can
2024-09-23 08:41:57 -07:00
Nuno Campos
9a8cc75ea2
Fix some typing issues in langgraph lib
2024-09-19 11:38:41 -07:00
Nuno Campos
b529365f5b
Remove ignore for 3.9
2024-09-19 09:19:26 -07:00
Nuno Campos
95304d658a
Fix 3.9
2024-09-19 08:51:15 -07:00
Nuno Campos
6c0339ca4b
ci: Enable mypy checks for checkpoint-sqlite lib
2024-09-19 08:46:44 -07:00
Nuno Campos
efb572f15b
Add missing branch
2024-09-18 13:18:37 -07:00
Nuno Campos and GitHub
3b05279e32
Implement serialization with msgpack library ( #1716 )
...
* Implement serialization with msgpack library
- encode custom python objects with a msgpack extension type, with constructor path string, and args encoded as nested msgpack doc
* Smaller msgpack extension types
* Update lock files
* lock
* Don't delegate to pydantic json
* Fix kafka serde
- should use our serializer to load, as inputs to subgraphs are serialized using it
2024-09-16 14:06:42 -07:00
Nuno Campos and GitHub
66fc7c96aa
More performance improvements in checkpointing and channels ( #1685 )
...
* Performance improvements in checkpointer libs
- Use sha1 instead of md5 for hashing (faster in python 3.x)
- Use orjson instead of json for json dumping (sadly can't use for json loading)
* Update tests
* Update
* Use random number instead of hash for get_version_number
* Avoid saving writes for the last task to complete in each step
- only when possible, exceptions for ERROR, INTERRUPT, SEND
* Make Channel.from_checkpoint a regular function
- context manager no longer needed since Context became a managed value
* Use __slots__ for Channels
* Fix for kafka
2024-09-12 21:08:30 -07:00
Nuno Campos
270559b880
Implement changes in sqlite checkpointer
2024-09-10 16:17:22 -07:00
Nuno Campos
5d1ab66535
sqlite 1.0.3
2024-09-03 09:41:04 -07:00
Nuno Campos and Nuno Campos
4793b3f5e1
Use a lock for all operations on sqlite checkpointer
...
- Otherwise when used in multiple subgraphs in parallel separate queries can interfere w each other
2024-09-03 09:20:17 -07:00
Vadym Barda and GitHub
d492475c61
checkpoint-sqlite: close connection in from_conn_string ( #1589 )
2024-09-03 11:00:37 -04:00
Nuno Campos
af666a87fb
sqlite 1.0.2
2024-09-02 17:58:01 -07:00
Nuno Campos
dd4a15b569
Require latest version of langgraph-checkpoint
2024-09-02 17:57:33 -07:00
Nuno Campos
0cc3799298
checkpoint: Implement sync methods in async checkpointers
...
- These are needed when subgraphs are invoked synchronously in nodes
2024-09-02 17:43:34 -07:00
Nuno Campos
3943637202
Bump them all
2024-08-30 14:18:35 -07:00
Nuno Campos
e744db169a
postgres/sqlite: Sort pending writes when fetching from db
2024-08-30 14:07:46 -07:00
Nuno Campos
e338a4ec98
Fix filtering on ns
2024-08-27 16:09:11 -07:00
Nuno Campos
330c91f622
Update ruff
2024-08-27 10:50:39 -07:00
vbarda
85e698e20b
filter on checkpoint NS
2024-08-26 19:26:35 -04:00
Vadym Barda and GitHub
4c4d7054ab
Merge branch 'main' into vb/update-get-state
2024-08-23 14:27:40 -04:00
vbarda
4162be8119
optimize subgraph state lookups
2024-08-22 20:35:08 -04:00
Nuno Campos and GitHub
7e32de9405
Remove current_tasks from checkpoint interface ( #1440 )
...
* Remove current_tasks from checkpoint interface
- Not used, now clear that it can be supported with put_writes(SCHEDULE)
* Add comment
2024-08-22 19:44:26 +00:00
vbarda
5654d8fc86
Merge branch 'main' into vb/update-get-state
2024-08-22 15:34:14 -04:00
Nuno Campos and GitHub
a261e1a497
Fix semantics of put_writes/list ( #1436 )
...
* Fix semantics of put_writes/list
- put_writes(error) should not prevent saving future successful if task is retried successfully
- put_writes(writes) should be a no-op if non-error writes already exist for that task (this prevents tasks executed more than once from modifying writes previously saved / acted on)
- checkpoints should not include channel default values (ie those without a version)
- list() should fetch and return writes for each checkpoint
* Lint
* Rm print
* Fix import
* Lint
2024-08-22 19:04:42 +00:00
vbarda
f51e7ea9a4
pass pending writes in checkpointers
2024-08-21 15:38:30 -04:00
vbarda
a94168af7f
Merge branch 'main' into vb/update-get-state
2024-08-21 15:07:52 -04:00
Nuno Campos
7aaeedd7ba
checkpoint-*: In put_writes clear any previously saved writes for this task_id
...
- Previously implementations were clearing only tasks if the index matched a previously saved one, which isn't enough to guarantee idempotency
2024-08-19 15:40:04 -07:00
vbarda
5033044587
update checkpointer tests
2024-08-12 16:22:27 -04:00
vbarda
fb05bdc2bf
return all checkpoints from .list
2024-08-12 15:52:17 -04:00
Vadym Barda and GitHub
71ce07d971
checkpoint: update docstrings for checkpoint libraries ( #1277 )
2024-08-08 16:26:16 +00:00
Vadym Barda and GitHub
d9adebed84
checkpoint-sqlite: release 1.0.0 ( #1244 )
2024-08-06 22:43:35 -04:00
b37f78942d
checkpoint-postgres: new library for postgres checkpointer implementation ( #1236 )
...
* checkpoint-postgres: new library for postgres checkpointer implementation
---------
Co-authored-by: Nuno Campos <nuno@langchain.dev >
2024-08-06 22:37:06 -04:00
vbarda
64c30508d9
checkpoint-sqlite: stop using checkpointers as context managers, use contextmanager only in from_conn_string
2024-08-05 16:20:16 -04:00
vbarda
2370db0f8c
order
2024-08-02 19:08:16 -04:00
vbarda
1b353aed73
checkpoint-sqlite: add checkpoint dependency
2024-08-02 19:06:38 -04:00
Vadym Barda and GitHub
c149a99b44
checkpoint-sqlite: new library for sqlite checkpointer implementation ( #1203 )
...
* checkpoint-sqlite: new library for sqlite checkpointer implementation
2024-08-02 22:14:12 +00:00