-
Notifications
You must be signed in to change notification settings - Fork 31
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
Iteration node #140
Comments
Interesting suggestion! I think it somewhat relates to #139 - both issues could be solved easily by transitioning from a batch-processing approach towards a streaming architecture. Still, the option of having nodes iterate over inputs could already allow flowpipe to fulfill many purposes that, for now, it couldn't. |
This looks very interesting, thanks for the elaborate example @Onandon11 ! I'd be happy to see this implemented. |
Great :D Shall I make a PR and try to cleanup the example to implement it? |
Yes, that would be great, thanks @Onandon11 |
Is your feature request related to a problem? Please describe.
In our library we have to call a specific subgraph quite frequently (for example 100+ times). Currently you either the following options to achieve this:
print(graph)
print(graph)
and draws a lot of lines.Describe the solution you'd like
I have in mind that in
Node.evaluate
a check is done if there are inputs that should be iterated over. If so, the node is calling itself that many times. The output of the node is then an iterable and the next node should notice that just like the previous did. For proof-of-principle I subclassed theFunctionNode
and created the following (ps.: This is far from prefect but it's as an example).Now you can write the following and it iterates without making more connections or nodes.
Please let me know what you guys think of this feature 😄 !!
The text was updated successfully, but these errors were encountered: