Removed outdated `torch` version checks from transform functions by nkaenzig · Pull Request #8359 · Project-MONAI/MONAI · GitHub
Skip to content

Removed outdated torch version checks from transform functions#8359

Merged
KumoLiu merged 7 commits into
Project-MONAI:devfrom
nkaenzig:fix/remove-torch-version-check-from-transform-functions
Feb 19, 2025
Merged

Removed outdated torch version checks from transform functions#8359
KumoLiu merged 7 commits into
Project-MONAI:devfrom
nkaenzig:fix/remove-torch-version-check-from-transform-functions

Conversation

@nkaenzig

Copy link
Copy Markdown
Contributor

Fixes #8348

Description

Support for torch versions prior to 1.13 has been dropped, so those 1.8 version checks are not required anymore. Furthermore, as reported in the issue description, those checks led to unstable behaviour when using certain transforms in data pipelines.

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.

@ericspod ericspod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is good, if we're through the tests and blossom we can merge, thanks!

@ericspod

Copy link
Copy Markdown
Member

@ericspod ericspod requested a review from KumoLiu February 19, 2025 15:19
Signed-off-by: Nicolas Kaenzig <nkaenzig@gmail.com>
Signed-off-by: Nicolas Kaenzig <nkaenzig@gmail.com>
I, Nicolas Kaenzig <nkaenzig@gmail.com>, hereby add my Signed-off-by to this commit: c040d85

Signed-off-by: Nicolas Kaenzig <nkaenzig@gmail.com>
Signed-off-by: Nicolas Kaenzig <nkaenzig@gmail.com>
I, Nicolas Kaenzig <nkaenzig@gmail.com>, hereby add my Signed-off-by to this commit: 33e1c66

Signed-off-by: Nicolas Kaenzig <nkaenzig@gmail.com>
@nkaenzig

Copy link
Copy Markdown
Contributor Author

@ericspod Thanks for the review. After a couple of attempts I managed to fix the DCO :D

@KumoLiu

KumoLiu commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

/build

@KumoLiu KumoLiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the quick fix, LGTM.

@KumoLiu KumoLiu enabled auto-merge (squash) February 19, 2025 16:01
@KumoLiu KumoLiu merged commit fb8c5bf into Project-MONAI:dev Feb 19, 2025
@nkaenzig nkaenzig deleted the fix/remove-torch-version-check-from-transform-functions branch February 20, 2025 14:26
@nkaenzig

Copy link
Copy Markdown
Contributor Author

@ericspod @KumoLiu Thanks a lot for the quick review & merge process. I wanted to ask if it would be possible to do a new release soon which includes those changes?

@ericspod

Copy link
Copy Markdown
Member

Can-Zhao pushed a commit to Can-Zhao/MONAI that referenced this pull request Mar 10, 2025
…ject-MONAI#8359)

Fixes Project-MONAI#8348

### Description

Support for `torch` versions prior to `1.13` has been dropped, so those
`1.8` version checks are not required anymore. Furthermore, as reported
in the issue description, those checks led to unstable behaviour when
using certain transforms in data pipelines.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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: Nicolas Kaenzig <nkaenzig@gmail.com>
Signed-off-by: Can-Zhao <volcanofly@gmail.com>
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.

RandCropByPosNegLabeld can lead to memory overflow

3 participants