Skip to content

Conversation

@wyli
Copy link
Contributor

@wyli wyli commented Jan 26, 2023

Signed-off-by: Wenqi Li wenqil@nvidia.com

Fixes #5007

Description

adds a warning message about changing the default value of image_only=False to image=True in 1.3

example warnings:

Python 3.8.13 (default, Mar 28 2022, 06:16:26) 
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from monai.transforms import LoadImage; LoadImage()
monai.transforms.io.array LoadImage.__init__:image_only: Current default value of argument `image_only=False` has been deprecated since 1.1. It will be changed to `image_only=True` in version 1.3.
<monai.transforms.io.array.LoadImage object at 0x7fe9e807fe20>
>>> from monai.transforms import LoadImageD; LoadImageD('test')
monai.transforms.io.dictionary LoadImaged.__init__:image_only: Current default value of argument `image_only=False` has been deprecated since 1.1. It will be changed to `image_only=True` in version 1.3.
<monai.transforms.io.dictionary.LoadImaged object at 0x7fe9c97062b0>
>>> 

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ericspod ,

Could you please help confirm this PR as you designed the "deprecated" API initially.

Thanks in advance.

Copy link
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it myself and got the same message which looks right to me.

wyli and others added 3 commits January 26, 2023 20:44
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Wenqi Li <831580+wyli@users.noreply.github.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Contributor Author

wyli commented Jan 26, 2023

/build

@wyli wyli enabled auto-merge (squash) January 26, 2023 22:57
@wyli wyli changed the title warning about the upcoming change of default image_only=True in LoadImage warning about the upcoming change of default image_only=True in LoadImage and remove deprecated transform args Jan 26, 2023
@wyli wyli merged commit 8a5a550 into Project-MONAI:dev Jan 27, 2023
@wyli wyli deleted the image-only-warning branch January 27, 2023 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set image_only=True in LoadImaged

3 participants