From 4aa85fc5e60953263ed9763cad4463fe0ec20026 Mon Sep 17 00:00:00 2001 From: KumoLiu Date: Wed, 13 Sep 2023 14:53:21 +0800 Subject: [PATCH] Revert "fix #6974" This reverts commit 9157e77987aa1646c7ddb6e085842139622aab90. --- monai/data/dataset.py | 2 +- monai/transforms/transform.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monai/data/dataset.py b/monai/data/dataset.py index 43b8a890b7..4f2061426e 100644 --- a/monai/data/dataset.py +++ b/monai/data/dataset.py @@ -95,7 +95,7 @@ def _transform(self, index: int): Fetch single data item from `self.data`. """ data_i = self.data[index] - return apply_transform(self.transform, data_i, lazy=self.transform.lazy) if self.transform is not None else data_i + return apply_transform(self.transform, data_i) if self.transform is not None else data_i def __getitem__(self, index: int | slice | Sequence[int]): """ diff --git a/monai/transforms/transform.py b/monai/transforms/transform.py index e4e90a53a2..8af3c9ade0 100644 --- a/monai/transforms/transform.py +++ b/monai/transforms/transform.py @@ -104,7 +104,7 @@ def apply_transform( map_items: bool = True, unpack_items: bool = False, log_stats: bool | str = False, - lazy: bool | None = False, + lazy: bool | None = None, overrides: dict | None = None, ) -> list[ReturnType] | ReturnType: """ @@ -124,7 +124,7 @@ def apply_transform( disables the logger for processing pipeline errors. Setting it to None or True will enable logging to the default logger name. Setting it to a string specifies the logger to which errors should be logged. lazy: whether to execute in lazy mode or not. See the :ref:`Lazy Resampling topic for more - information about lazy resampling. + information about lazy resampling. overrides: optional overrides to apply to transform parameters. This parameter is ignored unless transforms are being executed lazily. See the :ref:`Lazy Resampling topic for more details and examples of its usage.