Replies: 6 comments 2 replies
-
Hi, what's your use case for storing the compiled graph in redis? The compiled graph includes references to your node and edge functions therefore can't be serialized to json (or any similar format). You could try pickling the graph, see https://docs.python.org/3/library/pickle.html |
Beta Was this translation helpful? Give feedback.
-
Hi @nfcampos ,
Kind regards |
Beta Was this translation helpful? Give feedback.
-
@nfcampos Hi, I tried https://docs.python.org/3/library/pickle.html but got I also tried 538 return value if value is not None else SKIP_WRITE
539 else:
--> 540 raise InvalidUpdateError(f"Expected dict, got {input}")
541
542 # state updaters
InvalidUpdateError: Expected dict, got <object object at 0x7e7b38378d10> |
Beta Was this translation helpful? Give feedback.
-
Hi! Im facing the same issue. Did you found any way to achieve this? |
Beta Was this translation helpful? Give feedback.
-
Hi @soyfjimenez , regards |
Beta Was this translation helpful? Give feedback.
-
We are having similar problem right now. We have a scenario where users can dynamically create a graph on the web ui which we persist somewhere and can load later (when user logs out and logs in later). Is that feasible in LangGraph? Is there some kind of serilization of the compiled graph? Appreciated! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to keep the compiled graph into redis. Is there any way to serialize the compiled graph and save it in Redis?
Please let me know. I am getting error while loading the graph into Redis.
redis.exceptions.DataError: Invalid input of type: 'CompiledStateGraph'. Convert to a bytes, string, int or float first.
Thanks in advance.
Update: I can save the compiled graph as
to_json
but can't load this. Is there any to load the graph?Kind regards
Beta Was this translation helpful? Give feedback.
All reactions