@@ -66,7 +66,7 @@ def execute_compose(
6666 data: a tensor-like object to be transformed
6767 transforms: a sequence of transforms to be carried out
6868 map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple.
69- defaults to `True`. If set to an integer, the transform will be applied to that index of the input `data`.
69+ defaults to `True`. If set to an integer, recursively map the items in `data` `map_items` times .
7070 unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform.
7171 defaults to `False`.
7272 start: the index of the first transform to be executed. If not set, this defaults to 0
@@ -206,7 +206,7 @@ class Compose(Randomizable, InvertibleTransform, LazyTransform):
206206 Args:
207207 transforms: sequence of callables.
208208 map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple.
209- defaults to `True`. If set to an integer, the transform will be applied to that index of the input `data`.
209+ defaults to `True`. If set to an integer, recursively map the items in `data` `map_items` times .
210210 unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform.
211211 defaults to `False`.
212212 log_stats: this optional parameter allows you to specify a logger by name for logging of pipeline execution.
@@ -392,7 +392,7 @@ class OneOf(Compose):
392392 weights: probabilities corresponding to each callable in transforms.
393393 Probabilities are normalized to sum to one.
394394 map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple.
395- defaults to `True`.
395+ defaults to `True`. If set to an integer, recursively map the items in `data` `map_items` times.
396396 unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform.
397397 defaults to `False`.
398398 log_stats: this optional parameter allows you to specify a logger by name for logging of pipeline execution.
@@ -414,7 +414,7 @@ def __init__(
414414 self ,
415415 transforms : Sequence [Callable ] | Callable | None = None ,
416416 weights : Sequence [float ] | float | None = None ,
417- map_items : bool = True ,
417+ map_items : bool | int = True ,
418418 unpack_items : bool = False ,
419419 log_stats : bool | str = False ,
420420 lazy : bool | None = False ,
0 commit comments