Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming updates seem to include unchanged state from subgraphs #692

Open
shaibt opened this issue Nov 27, 2024 · 0 comments
Open

Streaming updates seem to include unchanged state from subgraphs #692

shaibt opened this issue Nov 27, 2024 · 0 comments

Comments

@shaibt
Copy link

shaibt commented Nov 27, 2024

I have a two tier hierarchy of graphs with some shared state between the "master" and the "subgraphs".
Each subgraph shares a partial set of state from the master in order to access the relevant current state when initiated, mutate it and return it back to the master.

The issue I'm seeing is that streaming updates seem to include state that was unchanged neither by the master or the subgraphs:

for namespace, type, chunk in supervisor_agent_graph.stream({ "messages": HumanMessage(request.message)}, config, stream_mode=["custom", "updates"], subgraphs=True):
            if type == "updates":
                [(node_name, value)] = chunk.items()
                #value includes state that was never changed
                last_update_value = value

Could it be that the "copying" of state forwards to the subgraph and back to the master is considered a state "update" even when the actual value of the state field does not change and is not updated explicitly by a node in the subgraph?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant