Describe the bug
When constructing a class that has a deprecated argument and both the new and deprecated argument are passed the construction fails. This may happen, for example, when using other libraries that automatically construct the classes from a yaml file.
Describe the bug When constructing a class that has a deprecated argument and both the new and deprecated argument are passed the construction fails. This may happen, for example, when using other libraries that automatically construct the classes from a yaml file.
To Reproduce
Expected behavior The instance of
UNet
should be created.Screenshots The error happens on line 190 of
monai/utils/deprecated.py
:Environment
MONAI version: 0.7.0 Numpy version: 1.20.3 Pytorch version: 1.9.0 MONAI flags: HAS_EXT = False, USE_COMPILED = False MONAI rev id: bfa054b9c3064628a21f4c35bbe3132964e91f43
Optional dependencies: Pytorch Ignite version: NOT INSTALLED or UNKNOWN VERSION. Nibabel version: 3.2.1 scikit-image version: 0.18.3 Pillow version: 8.3.1 Tensorboard version: 2.6.0 gdown version: NOT INSTALLED or UNKNOWN VERSION. TorchVision version: 0.10.0 tqdm version: 4.62.3 lmdb version: NOT INSTALLED or UNKNOWN VERSION. psutil version: 5.8.0 pandas version: 1.3.2 einops version: NOT INSTALLED or UNKNOWN VERSION. transformers version: NOT INSTALLED or UNKNOWN VERSION.