`Lazy=True` ignored when using nested `Compose`
Describe the bug
Lazy=True ignored when using nested Compose
To Reproduce
import monai.transforms as mt
from monai.data import Dataset
d = {"image": "/workspace/Code/MONAI/tests/testing_data/ref_avg152T1_LR.nii.gz"}
trans = mt.Compose(
[
mt.Flipd(keys="image", spatial_axis=1),
mt.NormalizeIntensityd(keys=["image"]),
mt.CenterSpatialCropd(keys=["image"], roi_size=(30, 30, 20)),
],
lazy=True,
log_stats=True
)
xform = mt.Compose(
[
mt.LoadImaged(keys="image", ensure_channel_first=True),
trans,
mt.RandAffined(keys="image", prob=1.0, rotate_range=45.0, translate_range=10.0, scale_range=0.15),
],
log_stats=True,
)
out_1 = xform(d)
I'll can address that in #7140, I think.
Hi @atbenmurray please discuss with the core dev team before self-assigning feature request.
Hi @wyli, self assigning of feature requests/enhancements happens all the time. e.g. #6985. Why is it an issue here?
In the process of addressing this in PR #7140
In the process of addressing this in PR #7140
it's unclear to me why a single PR is used to address multiple, separate significant bugs (https://github.com/Project-MONAI/MONAI/issues/7130 https://github.com/Project-MONAI/MONAI/issues/7139 https://github.com/Project-MONAI/MONAI/issues/7146). it makes design discussions difficult and in general not following best practices for this project. cc @aylward
Hi folks. I'm taking this task back on. The solution for it is still part of PR #7140