Skip to content

Pad base class#2802

Merged
wyli merged 17 commits into
Project-MONAI:devfrom
rijobro:base_class_Pad
Aug 19, 2021
Merged

Pad base class#2802
wyli merged 17 commits into
Project-MONAI:devfrom
rijobro:base_class_Pad

Conversation

@rijobro

@rijobro rijobro commented Aug 18, 2021

Copy link
Copy Markdown
Contributor

Description

Adds a Pad base class to be used by SpatialPad, BorderPad and DivisiblePad.

Pad works for both torch and numpy, and consequently so do the other padding classes.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • 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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@rijobro rijobro requested review from Nic-Ma and wyli August 18, 2021 13:19
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@rijobro

rijobro commented Aug 19, 2021

Copy link
Copy Markdown
Contributor Author

@wyli how did you solve the typing problem on the previous PR? I'm seeing the same thing here: https://github.com/Project-MONAI/MONAI/pull/2802/files#diff-24a052cc80d92db9eeddbd616450f309e9b88d293f187f469b9f73dbf4cf85f9R313-R316.

The input to the function is NdarrayTensor, the output of convert_data_type is NdarrayTensor, and the output of the function is NdarrayTensor, so I don't see what's wrong.

Error is here: https://github.com/Project-MONAI/MONAI/pull/2802/checks?check_run_id=3370033821#step:7:377

@wyli

wyli commented Aug 19, 2021

Copy link
Copy Markdown
Contributor

@wyli how did you solve the typing problem on the previous PR? I'm seeing the same thing here: https://github.com/Project-MONAI/MONAI/pull/2802/files#diff-24a052cc80d92db9eeddbd616450f309e9b88d293f187f469b9f73dbf4cf85f9R313-R316.

The input to the function is NdarrayTensor, the output of convert_data_type is NdarrayTensor, and the output of the function is NdarrayTensor, so I don't see what's wrong.

Error is here: https://github.com/Project-MONAI/MONAI/pull/2802/checks?check_run_id=3370033821#step:7:377

I try to enhance the typing here c641671, still, I added two type: ignore in monai/transforms/croppad/array.py, otherwise I feel the full typing annotation will hurt the readability.

wyli added 2 commits August 19, 2021 19:58
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli enabled auto-merge (squash) August 19, 2021 22:37
@wyli wyli merged commit 7659869 into Project-MONAI:dev Aug 19, 2021
@rijobro rijobro deleted the base_class_Pad branch August 20, 2021 13:14
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.

2 participants