data.buffer.middleware.group_sample¶
group_sample¶
group_sample¶
- ding.data.buffer.middleware.group_sample.group_sample(size_in_group: int, ordered_in_group: bool = True, max_use_in_group: bool = True) Callable [source]¶
- Overview:
The middleware is designed to process the data in each group after sampling from the buffer.
- Arguments:
size_in_group (
int
): Sample size in each group.ordered_in_group (
bool
): Whether to keep the original order of records, default is true.max_use_in_group (
bool
): Whether to use as much data in each group as possible, default is true.