Describe the bug
The pattern of invoking transforms with a lazy parameter depending on isinstance(transform, LazyTrait) is problematic
|
return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data) |
because the
LazyTrait API doesn't provide a
__call__ design.
|
class LazyTrait: |
|
""" |
|
An interface to indicate that the transform has the capability to execute using |
(introduced since #6537)
Describe the bug
The pattern of invoking transforms with a
lazyparameter depending onisinstance(transform, LazyTrait)is problematicMONAI/monai/transforms/transform.py
Line 98 in e6ec945
because the
LazyTraitAPI doesn't provide a__call__design.MONAI/monai/transforms/traits.py
Lines 22 to 24 in e6ec945
(introduced since #6537)