Using custom serde for metadata as well #1755
vermapratyush
started this conversation in
Discussions
Replies: 1 comment 1 reply
-
Hi @vermapratyush, I think I'm experiencing a similar or related problem. I'm using the Postgres checkpoint saver and receive serialization warnings/errors which I think is linked to your comments above.
Do you have any advice for resolving these? Many thanks |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using langgraph with a custom serde for checkpointer. The custom serde knows how to serialize and deserialize a proto object.
I am invoking the graph like this:
(see logs below)
I see that the metadata column (in checkpoints table), the first entry contains a serialised version of the agent state. Subsequent rows (for the graph invocation) only contain the delta of the agent state. Meaning, they only contain fields which which are returned by the node.
This is all good for the first message, however on subsequent messages when agent_state is not empty (and contains proto objects), the serializer for metadata column won't be any good.
I created a custom build of with the following changes and it worked file.
file:
langgraph/checkpoint/postgres/base.py
But with a custom serde, the filtering function
_search_where
may not work as expected.Logs:
Beta Was this translation helpful? Give feedback.
All reactions