data_juicer.ops.grouper package¶
Submodules¶
data_juicer.ops.grouper.key_value_grouper module¶
- class data_juicer.ops.grouper.key_value_grouper.KeyValueGrouper(group_by_keys: List[str] | None = None, *args, **kwargs)[source]¶
Bases:
Grouper
Group samples to batched samples according values in given keys.
data_juicer.ops.grouper.naive_grouper module¶
data_juicer.ops.grouper.naive_reverse_grouper module¶
- class data_juicer.ops.grouper.naive_reverse_grouper.NaiveReverseGrouper(batch_meta_export_path=None, *args, **kwargs)[source]¶
Bases:
Grouper
Split batched samples to samples.
Module contents¶
- class data_juicer.ops.grouper.KeyValueGrouper(group_by_keys: List[str] | None = None, *args, **kwargs)[source]¶
Bases:
Grouper
Group samples to batched samples according values in given keys.
- class data_juicer.ops.grouper.NaiveGrouper(*args, **kwargs)[source]¶
Bases:
Grouper
Group all samples to one batched sample.
- class data_juicer.ops.grouper.NaiveReverseGrouper(batch_meta_export_path=None, *args, **kwargs)[source]¶
Bases:
Grouper
Split batched samples to samples.