You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
I am trying to serialize compiledstategraph object to use across API calls. I tried to pickle, getting this below error
b'"Can't pickle local object 'CompgiledStateGraph.attach_node.._get_updates'"''
How to serialize the compilestategraph
System Info
Python
The text was updated successfully, but these errors were encountered:
Out of curiosity, why do you need to pickle the compiled graph?
State is managed via checkpointing. persistence across api calls, servers, etc. should all be covered by this. The graph object itself isn't usually pickled
@hinthornw I have build a fast api wrapper on top of Human in loop. I have two endpoint one for create call and another endpoint for resume.
In create call I create graph/workflow object. Once the interrupt issued I want to hit resume endpoint and need to use same object which is already created. I can get the state details via get_state.. still the graph object itself missing since it is function scoped.. If I can serialize then I can avoid creating graph everytime ..
@BharahthyKannan there is no cost associated with creating state graph, so you can safely re-create it every time. did you have any other concerns besides that?
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I am trying to serialize compiledstategraph object to use across API calls. I tried to pickle, getting this below error
b'"Can't pickle local object 'CompgiledStateGraph.attach_node.._get_updates'"''
How to serialize the compilestategraph
System Info
Python
The text was updated successfully, but these errors were encountered: