Search - User list
Full Version: Custom Partitioner: Zip around primary input
Root » PDG/TOPs » Custom Partitioner: Zip around primary input

I'm trying to find existed partitioner where you can make dependencies around a primary node and all other workitems (like a zip function). Do you have some partition with similar behavior?

Example hip with custom partitioner in the attachment or just python snippet.

node_map = {}
for work_item in work_items:
    if not in node_map:
        node_map[] = []

# genericgenerator1 - could be defined as a primary input
# genericgenerator# - all other nodes

for work_item in node_map['genericgenerator1']:
    partition_holder.addItemToPartition(work_item, work_item.index)
    for i in node_map['genericgenerator2']:
        partition_holder.addItemToPartition(i, work_item.index)

I think what you want here is a partitionbyindex node with Primary Input set to By Index and Secondary Input set to All.
Oh! That is right.
Thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB