Skip to content

Conversation

@binliunls
Copy link
Contributor

@binliunls binliunls commented Mar 21, 2023

Fixes #6208 .

Description

  1. Add pre_conv as a parameter to FlexibleUNet to make the model forward compatible.
  2. Update the torch.Tensor type hint in the UpCat function to fit the torchscript requirement.

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.

binliunls and others added 4 commits March 21, 2023 08:57
…sic unet

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
@binliunls binliunls requested review from Nic-Ma and wyli March 21, 2023 09:18
@binliunls
Copy link
Contributor Author

binliunls commented Mar 21, 2023

Hi @wyli ,
I think the torchscript doesn't support the | expression in the typehint like x : torch.Tensor | None. However when I tried to change it to Optional[torch.Tensor], the pre-commit.ci always changed it back to the | expression. Could you please give me some advices on how to make the change possible?

Thanks,
Bin

@wyli
Copy link
Contributor

wyli commented Mar 21, 2023

sure, I can have a look

@wyli wyli force-pushed the 6208-fix-endoscopic-tool-segmentation-ckpt-export branch from 442d123 to fa1bb08 Compare March 21, 2023 09:41
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli force-pushed the 6208-fix-endoscopic-tool-segmentation-ckpt-export branch from fa1bb08 to 8b78144 Compare March 21, 2023 09:42
@wyli wyli changed the base branch from dev to auto-update March 21, 2023 09:47
@wyli wyli merged commit 0ea3b85 into Project-MONAI:auto-update Mar 21, 2023
wyli added a commit that referenced this pull request Mar 21, 2023
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

merging #6210 (fixes
#6207)
merging #6209 (fixes
#6208)
fixes #6171

---------

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Co-authored-by: binliunls <107988372+binliunls@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
jak0bw pushed a commit to jak0bw/MONAI that referenced this pull request Mar 28, 2023
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

merging Project-MONAI#6210 (fixes
Project-MONAI#6207)
merging Project-MONAI#6209 (fixes
Project-MONAI#6208)
fixes Project-MONAI#6171

---------

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Co-authored-by: binliunls <107988372+binliunls@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
jak0bw pushed a commit to jak0bw/MONAI that referenced this pull request Mar 28, 2023
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

merging Project-MONAI#6210 (fixes
Project-MONAI#6207)
merging Project-MONAI#6209 (fixes
Project-MONAI#6208)
fixes Project-MONAI#6171

---------

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
Co-authored-by: binliunls <107988372+binliunls@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <wenqil@nvidia.com>
@binliunls binliunls deleted the 6208-fix-endoscopic-tool-segmentation-ckpt-export branch March 30, 2023 15:53
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.

Cannot convert the endoscopic_tool_segmentation pretrained model to torchscrpit

2 participants