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

Handle post instantiation graph modification #170

Open
CJ-Wright opened this issue Mar 7, 2019 · 0 comments
Open

Handle post instantiation graph modification #170

CJ-Wright opened this issue Mar 7, 2019 · 0 comments

Comments

@CJ-Wright
Copy link
Member

There are three main methods for modifying the graph after the nodes are instantiated, move_to_first which changes the upstream ordering, .connect which adds nodes to the upstreams, and .disconnect which is the inverse of .connect. .disconnect is not used frequently so we'll neglect it here.

To identify .connect we can examine the node args (which contain which nodes were subscribed to at init time) and the .upstreams attribute, which holds the current upstreams. Whatever nodes are in .upstreams which are not in args were connected in. This is important as we need to match the .connect syntax and usage for true pipeline recreation, since .connect can be used to create cyclic graphs, which are currently forbidden in the pipeline recreation step (since we do a topo sort and need to have higher nodes present in order to subscribe to them).

To identify move_to_first we need to compare the ordering of the args and the .upstreams. Here we need to match the .upstreams order wit the final pipeline.

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