Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4480 skip unused resampling #4481

Merged
merged 2 commits into from
Jun 10, 2022
Merged

Conversation

wyli
Copy link
Contributor

@wyli wyli commented Jun 10, 2022

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

Fixes #4480

Description

the previous test covers this case:

def test_skipped_transform_consistency(self, im, in_dtype):
t1 = RandAffine(prob=0)
t2 = RandAffine(prob=1, spatial_size=(10, 11))
im, *_ = convert_data_type(im, dtype=in_dtype)
out1 = t1(im)
out2 = t2(im)
# check same type
self.assertEqual(type(out1), type(out2))
# check matching dtype
self.assertEqual(out1.dtype, out2.dtype)

Status

Ready

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
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.

Looks good to me but this was something missed in tests since it's hard to test a random transform doing nothing sometimes.

@wyli
Copy link
Contributor Author

wyli commented Jun 10, 2022

/build

@wyli wyli enabled auto-merge (squash) June 10, 2022 11:20
@wyli
Copy link
Contributor Author

wyli commented Jun 10, 2022

/build

@wyli wyli merged commit 96c6cc3 into Project-MONAI:dev Jun 10, 2022
@wyli wyli deleted the 4480-skip-resampling branch June 30, 2022 20:29
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.

RandAffine -- skip resampling if not necessary
2 participants