Skip to main content

group_work_items

Function group_work_items 

Source
pub fn group_work_items<P>(
    items: Vec<WorkItem<P>>,
    config: &GroupingConfig,
) -> Vec<BatchGroup<P>>
Expand description

Group work items into BatchGroups by (model, prefix_hash, context_bucket).

Items are grouped by the composite key. Within each group, items are in their original order. The groups themselves are sorted by key (model first, then prefix_hash, then context_bucket).