python/ray/data/dataset_pipeline.py
def foreach_window(
        self, fn: Callable[[Dataset[T]], Dataset[U]]
    ) -> "DatasetPipeline[U]":
        """Apply a transform to each dataset/window in this pipeline.

        Args:
            fn: The function to transform each dataset with.

        Returns:
            The transformed DatasetPipeline.
        """
        if self._executed[0]:
            raise RuntimeError("Pipeline cannot be read multiple times.")
        return DatasetPipeline(
            self._base_iterable,
            self._stages + [fn],
            self._length,
            self._progress_bars,
            _executed=self._executed,
        )
Apply a transform to each dataset/window in this pipeline.

        Args:
            fn: The function to transform each dataset with.

        Returns:
            The transformed DatasetPipeline.
        
Apply a transform to each dataset/window in this pipeline.
Apply a transform to each dataset / window in this pipeline .
def foreach_window(
        self, fn: Callable[[Dataset[T]], Dataset[U]]
    ) -> "DatasetPipeline[U]":
        if self._executed[0]:
            raise RuntimeError("Pipeline cannot be read multiple times.")
        return DatasetPipeline(
            self._base_iterable,
            self._stages + [fn],
            self._length,
            self._progress_bars,
            _executed=self._executed,
        )
def foreach_window ( self , fn : Callable [ [ Dataset [ T ] ] , Dataset [ U ] ] ) -> "DatasetPipeline[U]" : if self . _executed [ 0 ] : raise RuntimeError ( "Pipeline cannot be read multiple times." ) return DatasetPipeline ( self . _base_iterable , self . _stages + [ fn ] , self . _length , self . _progress_bars , _executed = self . _executed , )
Apply a transform to each dataset/window in this pipeline.
Apply a transform to each dataset / window in this pipeline .
"""Apply a transform to each dataset/window in this pipeline.

        Args:
            fn: The function to transform each dataset with.

        Returns:
            The transformed DatasetPipeline.
        """
The transformed DatasetPipeline.
The transformed DatasetPipeline .
self
fn
Callable[[Dataset[T]], Dataset[U]]
The function to transform each dataset with.
The function to transform each dataset with .