@@ -101,18 +101,18 @@ def __init__(
101101 * ,
102102 is_udf : bool = False ,
103103 output_block_size_option : Optional [OutputBlockSizeOption ] = None ,
104- reports_custom_op_stats : bool = False ,
104+ should_report_custom_op_stats : bool = False ,
105105 ):
106106 """Initialize a :class:`MapTransformFn`.
107107
108108 Args:
109109 fn: The wrapped transform callable. Invoked with ``(data, ctx)``, or
110110 ``(data, ctx, report_custom_op_stats)`` when
111- ``reports_custom_op_stats =True``.
111+ ``should_report_custom_op_stats =True``.
112112 input_type: Expected type of the input data.
113113 is_udf: Whether this transformation is UDF or not.
114114 output_block_size_option: (Optional) Output block size configuration.
115- reports_custom_op_stats : If ``True``, the wrapped callable accepts a
115+ should_report_custom_op_stats : If ``True``, the wrapped callable accepts a
116116 third ``report_custom_op_stats`` callback argument and may report
117117 per-task :class:`CustomOpStats` to the driver. Defaults to
118118 ``False``, in which case the callable is invoked with
@@ -122,7 +122,7 @@ def __init__(
122122 self ._input_type = input_type
123123 self ._output_block_size_option = output_block_size_option
124124 self ._is_udf = is_udf
125- self ._reports_custom_op_stats = reports_custom_op_stats
125+ self ._should_report_custom_op_stats = should_report_custom_op_stats
126126
127127 @abstractmethod
128128 def _post_process (self , results : Iterable [MapTransformFnData ]) -> Iterable [Block ]:
@@ -137,10 +137,10 @@ def _apply_transform(
137137 """Call the wrapped fn, passing ``report_custom_op_stats`` only if it opted in.
138138
139139 Keeps the common ``(data, ctx)`` signature for the vast majority of
140- transforms; only those constructed with ``reports_custom_op_stats =True``
140+ transforms; only those constructed with ``should_report_custom_op_stats =True``
141141 receive the report callback.
142142 """
143- if self ._reports_custom_op_stats :
143+ if self ._should_report_custom_op_stats :
144144 return self ._fn (inputs , ctx , report_custom_op_stats )
145145 return self ._fn (inputs , ctx )
146146
@@ -375,14 +375,14 @@ def __init__(
375375 * ,
376376 is_udf : bool = False ,
377377 output_block_size_option : OutputBlockSizeOption ,
378- reports_custom_op_stats : bool = False ,
378+ should_report_custom_op_stats : bool = False ,
379379 ):
380380 super ().__init__ (
381381 row_fn ,
382382 input_type = MapTransformFnDataType .Row ,
383383 is_udf = is_udf ,
384384 output_block_size_option = output_block_size_option ,
385- reports_custom_op_stats = reports_custom_op_stats ,
385+ should_report_custom_op_stats = should_report_custom_op_stats ,
386386 )
387387
388388 def _pre_process (self , blocks : Iterable [Block ]) -> Iterable [MapTransformFnData ]:
@@ -438,14 +438,14 @@ def __init__(
438438 zero_copy_batch : bool = True ,
439439 output_block_size_option : Optional [OutputBlockSizeOption ] = None ,
440440 target_batch_size_bytes : int = _DEFAULT_BATCH_SIZE_BYTES ,
441- reports_custom_op_stats : bool = False ,
441+ should_report_custom_op_stats : bool = False ,
442442 ):
443443 super ().__init__ (
444444 batch_fn ,
445445 input_type = MapTransformFnDataType .Batch ,
446446 is_udf = is_udf ,
447447 output_block_size_option = output_block_size_option ,
448- reports_custom_op_stats = reports_custom_op_stats ,
448+ should_report_custom_op_stats = should_report_custom_op_stats ,
449449 )
450450
451451 self ._batch_size = batch_size
@@ -487,7 +487,7 @@ def __init__(
487487 is_udf : bool = False ,
488488 disable_block_shaping : bool = False ,
489489 output_block_size_option : Optional [OutputBlockSizeOption ] = None ,
490- reports_custom_op_stats : bool = False ,
490+ should_report_custom_op_stats : bool = False ,
491491 ):
492492 """
493493 Initializes the object with a transformation function, accompanying options, and
@@ -500,7 +500,7 @@ def __init__(
500500 disable_block_shaping: Disables block-shaping, making transformer to
501501 produce blocks as is.
502502 output_block_size_option: (Optional) Configure output block sizing.
503- reports_custom_op_stats : If ``True``, ``block_fn`` accepts a third
503+ should_report_custom_op_stats : If ``True``, ``block_fn`` accepts a third
504504 ``report_custom_op_stats`` callback argument and may report
505505 per-task :class:`CustomOpStats` to the driver.
506506 """
@@ -510,7 +510,7 @@ def __init__(
510510 input_type = MapTransformFnDataType .Block ,
511511 is_udf = is_udf ,
512512 output_block_size_option = output_block_size_option ,
513- reports_custom_op_stats = reports_custom_op_stats ,
513+ should_report_custom_op_stats = should_report_custom_op_stats ,
514514 )
515515
516516 self ._disable_block_shaping = disable_block_shaping
0 commit comments