-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: support batch node groups (aka zipped/pairwise batch nodes) #7553
Conversation
Can these batch nodes take a collection input to build the list up elsewhere? e.g. The string batch input could be fed via the If not, could a load from file option be added to the node? |
4de524d
to
b6aae16
Compare
3fe8ae4
to
74a4197
Compare
Batch and generator nodes cannot interact with with non-batch nodes. But we can do things like load prompts from file by implementing it in javascript. For example, load from file -> browse FS for file -> load and parse directly in the UI. |
b6aae16
to
8a29a11
Compare
This is used to link batch nodes into zipped batch data collections.
… to have mismatched collection sizes
74a4197
to
81e21cc
Compare
Summary
Adds support for batch node groups.
Previously, multiple batch nodes were combined by taking the cartesian product of their collections and executing the workflow once per permutation.
For example, say we have 2 string batch nodes which route into a string join node:
This results in 2 * 2 = 4 workflow executions. Every possible combination of strings are fed into the join.
These are the outputs of the join:
With batch node groups, all batch nodes in a group are first zipped together before the product is taken. The zipped group then functions like a single batch node in the product operation.
Set the two string batch nodes to the same group:
This will result in 2 executions. The string batch values are zipped/paired, so that the first items in both collections are used in the first execution, and the second items in both collections are used in the second execution.
These are the outputs of the join with the two batches grouped:
Notes:
Related Issues / Discussions
offline discussion
QA Instructions
Try it out.
Merge Plan
This PR is dependent on #7545.
Checklist