640 Commits
Author SHA1 Message Date
Nuno CamposandGitHub e8cb6565ee langgraph 0.2.21 2024-09-13 12:18:04 -07:00
Nuno Campos 4cd9540427 Remove grandalf from dev deps
- this was never included in published package, given it's a dev dep, but some people get confused, so easier to remove
2024-09-13 11:13:10 -07:00
Vadym BardaandGitHub 33f9ec6c04 langgraph: release 0.2.20 (#1714) 2024-09-13 10:36:05 -04:00
c3b4acf3f1 checkpoint postgres: allow passing custom serde (#1699)
* Use correct serde in postgres checkpoint

* Revert metadata serde

* Revert

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-09-12 21:09:23 -07:00
Nuno CamposandGitHub 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 CamposandGitHub 8a80b1d3b1 Add 2 more benchmark graphs (#1707) 2024-09-12 16:31:16 -07:00
Nuno CamposandGitHub 95b97d69ec Nc/12sep/perf (#1702)
* Remove unused fil;e

* Add benchmark-fast command for running locally

* Small improvements to jsonplus serializer

* Don't use PregelNode.mapper when schema is a typed dict

- All it would do is create a new copy of same dict

* Avoid copying checkpoint when fetching at beginning of loop

* Fix needs array

* Update tests
2024-09-12 12:50:53 -07:00
Nuno CamposandGitHub 8f87cd1c91 Performance improvements in core library (#1683)
* Performance improvements in core library

- Avoid creating new callback manager when received one as arg
- Avoid looking for config when already received one as arg
- Avoid copies of values in ensure_config/merge_configs
- Implement version of ensure_config that accepts multiple configs (avoids calling merge_configs first)
- Avoid calling merge_configs when we only need to attach extra tags/metadata

* Fix

* Fix

* Try again

* Debug ci job

* Fix

* Try again

* Try again

* Try again

* Some more variations

* Attach annotation to first changed file

* Fix

* Re-enable benchmarks
2024-09-12 11:01:37 -07:00
Nuno CamposandGitHub 73d1051034 Merge pull request #1693 from langchain-ai/nc/11sep/kafka-finally-send
kafka: Expose finally_send as public api
2024-09-11 16:48:41 -07:00
Nuno Campos 571623442a Avoid closing drain before seeing first message in either topic 2024-09-11 16:45:43 -07:00
Nuno CamposandGitHub c172362918 Merge pull request #1691 from langchain-ai/nc/11sep/kafka-sync
kafka: Implement sync orchestrator and executor classes
2024-09-11 16:34:01 -07:00
Nuno CamposandGitHub 115c37acea Merge pull request #1686 from langchain-ai/nc/11sep/kafka-configurable-consumer-producer
kafka: Make consumer and producer classes configurable
2024-09-11 16:33:15 -07:00
Nuno Campos dd68babac7 kafka: Expose finally_send as public api
- Enables attaching a list of messages (topic/key/value) to send when run finishes
2024-09-11 16:31:35 -07:00
Vadym BardaandGitHub 63c34ca992 langgraph: update snapshots for 0.3.x core tests (#1692) 2024-09-11 19:28:47 -04:00
Nuno Campos 4accc19734 kafka: Implement sync orchestrator and executor classes 2024-09-11 16:06:50 -07:00
Vadym BardaandGitHub 84643b2789 langgraph: update core & snapshots (#1689) 2024-09-11 21:59:12 +00:00
Nuno Campos 217b07ae65 kafka: Make consumer and producer classes configurable
- Define protocol for sync and async producer and consumer
- Accept consumer/producer as init args in Orchestrator/Executor
- If not passed in, create default consumer/producer as before
2024-09-11 14:27:08 -07:00
Nuno Campos f179da00a0 update bench job 2024-09-11 13:41:45 -07:00
Nuno CamposandGitHub 8e275fa485 Merge pull request #1609 from langchain-ai/nc/4sep/benchmark
Add benchmark script
2024-09-11 12:29:22 -07:00
Nuno Campos 47dae71841 Remove files 2024-09-11 12:28:38 -07:00
Nuno Campos bf4f8e67d8 Rename command 2024-09-11 12:25:22 -07:00
Nuno Campos d844359d61 Fix output dir 2024-09-11 12:23:59 -07:00
Nuno Campos f577529356 Add benchmark/profile commands 2024-09-11 11:44:18 -07:00
Tat Dat Duong a60a4606fb fix(sdk-js): bump to 0.0.9 2024-09-11 19:41:51 +02:00
gbaian10andGitHub bf6ad19963 refactor: Type narrowing for ToolNode.name (#1678)
Avoid type incompatibility when using `add_node` to add a `ToolNode`.
2024-09-11 13:11:39 -04:00
Vadym BardaandGitHub f3b5d804ab ci: fix kafka scheduler, split langgraph and kafka into separate test jobs (#1677) 2024-09-11 10:55:11 -04:00
Nuno Campos 26f23ea26c Add benchmark script 2024-09-10 17:32:47 -07:00
Nuno Campos 5de46f7472 Update stop condition for drain 2024-09-10 16:52:09 -07:00
Nuno Campos bdabb723b0 Add langgraph dep 2024-09-10 16:39:34 -07:00
Nuno Campos edc0fd0210 Remove extraneous asserts 2024-09-10 16:20:45 -07:00
Nuno Campos 3886b76771 Lint 2024-09-10 16:17:22 -07:00
Nuno Campos 3a65460767 Use anyio for timeout in dran test helper 2024-09-10 16:17:22 -07:00
Nuno Campos 5e0273886e Lint 2024-09-10 16:17:22 -07:00
Nuno Campos 943cc4d83a Add readme, lint 2024-09-10 16:17:22 -07:00
Nuno Campos 270559b880 Implement changes in sqlite checkpointer 2024-09-10 16:17:22 -07:00
Nuno Campos 98b8595a94 Move to dev deps 2024-09-10 16:17:22 -07:00
Nuno Campos f7dffa023c Implement subgraph delegation for distributed arch 2024-09-10 16:17:22 -07:00
Nuno Campos 7dc69a543d Rename 2024-09-10 16:17:22 -07:00
Nuno Campos 8f91402642 Use thread_id for partition key, ignore tasks for stale checkpoints 2024-09-10 16:17:22 -07:00
Nuno Campos 030d6d2def Fix subgraph test 2024-09-10 16:17:22 -07:00
Nuno Campos ad7dd0dbb7 Add drain_topics test helper 2024-09-10 16:17:22 -07:00
Nuno Campos 0eb11a3cf9 Remove is_resuming arg 2024-09-10 16:17:22 -07:00
Nuno Campos 1ce8d628f2 In update state skip nodes not found in instance
eg, because removed since
2024-09-10 16:17:22 -07:00
Nuno Campos 5e6b58f847 Remove double shield usage
- we already shield from cancellation in PregelLoop so shouldnt be repeating in AsyncBackgroundExecutor
2024-09-10 16:17:22 -07:00
Nuno Campos b13db42568 WIP Subgraphs 2024-09-10 16:17:22 -07:00
Nuno Campos 83d36761a4 Rename compose projects 2024-09-10 16:17:22 -07:00
Nuno Campos d206621230 Rename test 2024-09-10 16:17:22 -07:00
Nuno Campos 8e6caab78c Add test for interrupts 2024-09-10 16:17:22 -07:00
Nuno Campos ad463ec90a Add more test assertions 2024-09-10 16:17:22 -07:00
Nuno Campos 2d02e5e0c5 Add error topic, add retries (eg for checkpointer database exceptions) 2024-09-10 16:17:22 -07:00