Skip to content

remove unused RandomizableTransform#1952

Merged
wyli merged 2 commits intoProject-MONAI:masterfrom
wyli:fixes-randomise
Apr 6, 2021
Merged

remove unused RandomizableTransform#1952
wyli merged 2 commits intoProject-MONAI:masterfrom
wyli:fixes-randomise

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Apr 5, 2021

Description

fixes a few usage of RandomizableTransform:

  • a few transforms inherit RandomizableTransform but doesn't initialise it (addresses "__init__ method from the base class not called PYL-W0231")
  • a few transforms have super().__init__(prob=1.0, do_transform=True), effectively not using the RandomizableTransform, therefore change to inherit Randomizable for clarity
  • all cache-based datasets now check isinstance Randomizable instead of Randomizable as the defining property
  • partly fixes a few "Attribute defined outside __init__ PYL-W0201"

Status

Ready

Types of changes

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

@wyli wyli requested review from Nic-Ma and rijobro April 5, 2021 22:43
@wyli wyli marked this pull request as ready for review April 5, 2021 23:00
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Apr 5, 2021

/integration-test

@Nic-Ma
Copy link
Copy Markdown
Contributor

Nic-Ma commented Apr 6, 2021

@rijobro could you please help review this PR?

Thanks in advance.

@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Apr 6, 2021

@wyli wyli enabled auto-merge (squash) April 6, 2021 13:59
@wyli wyli merged commit 81cfbf0 into Project-MONAI:master Apr 6, 2021
nsrivathsa pushed a commit to nsrivathsa/MONAI that referenced this pull request Apr 12, 2021
@wyli wyli deleted the fixes-randomise branch April 29, 2021 11:04
@wyli wyli mentioned this pull request May 19, 2021
1 task
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.

3 participants