Partition Split by Attribute: Improvement

   4277   8   0
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
Is it possible to add the ability to use multiple split attributes? Or maybe you already have existed solution?

Use Case: To split workitems by shot and wedge or by shot and eye at the same time.
User Avatar
Staff
585 posts
Joined: May 2014
Offline
That sounds like a good RFE – I'll log it.

In the mean time, what you can do to achieve similar functionality is create a new string attribute using the attribute create. Set the value to the expressiion `@eye`.`@wedgeindex` for example, and then split by that attribute instead.
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
It may not work.
We need something that could work with an intersection attribute.
Probably example explains it better. In the example, each range should have a connection to the relative shot.
Edited by Ostap - Aug. 7, 2020 00:05:00

Attachments:
Screen Shot 2020-08-07 at 4.00.48 PM.png (89.2 KB)
partition_intersection.hipnc (131.0 KB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
Sorry, I'm still not sure I follow. In that situation, how many partitions do you want to have in the partitionbyframe node? Should there be one for each wedge, for each shot (4 total?), and then all of the range work items are in the corresponding one?
Edited by tpetrick - Aug. 7, 2020 13:14:56
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
I would expect 40 partitions because we don't have (in this case) duplicated wedge index, shot and frame is the same time but those partitions should hold a relative (intersected) shot workitem from another node.

In other words:
If we would use the “Merge” node then our wourkitem count is 42 but with partition “Split by Attributes” (wedge, shot) we can have 40 partitions because “shot” attr. has been intersected with 2 groups of other workitems.

Also, “Missing Attribute” parm. can play a key role because 2 workitems don't have a wedge and frame attributes to match (to all other workitems), so “Add work item to all partition” option would assume that missing attributes are equal to comparing workitem attributes.
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
Is that make sense of what I mentioned above?
User Avatar
Staff
585 posts
Joined: May 2014
Offline
I think so – I've attached this discussion to the RFE, and I'll let you know when there's something to test.
User Avatar
Staff
585 posts
Joined: May 2014
Offline
A bit of an update for you.

I've made several changes to make what you want possible. Firstly, the partition by frame node has an extra option to it so that work items without a frame can be put into all partitions instead of being ignored:



Secondly, the split by attribute field now accepts a space-separated list of attribute names. Internally it forms tuples of values from those attributes, and groups work items by unique tuple:



Its possible that a work item is missing one or more of the attributes – that's the case the file you sent, where some work items don't have a wedgeindex. There's a new option called “Allow Partial Matches” to handle that case. If that option is enabled, then the work item will be put into all split groups that match the attributes they do have. Those changes are available on all partitioner nodes, not just the partition by frame.

For example, if you have work items with a shot of 1 or 2 and a wedgeindex on one branch, then on the other branch you have work items with only a shot of 1 or 2. The work items that only have the shot will go into all matching groups regardless of the wedge index:




I've attached an update copy of your example file, but basically you need to change the “Missing Frame” parameter to “Add Work Item to All Partitions”, set the “Split by Attribute” to “wedge shot”, and enable “Allow Partial Matches”. Those changes were enabled last week, so they'll be available in the latest daily build of 18.0.
Edited by tpetrick - Sept. 8, 2020 13:26:39

Attachments:
byframe.png (29.4 KB)
partitioners.png (8.0 KB)
partition_intersection.hipnc (130.8 KB)
example.gif (408.0 KB)

User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
That is amazing! Really useful and it works as expected.
Thank you!

Maybe in this implementation parm should be renamed into “Split by AttributeS”?
  • Quick Links