-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Updates for Pytorch 2.7 #8429
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
base: dev
Are you sure you want to change the base?
Updates for Pytorch 2.7 #8429
Conversation
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates MONAI’s torch dependency to a newer version aiming for improved compatibility with PyTorch. The changes include:
- Increasing the minimum torch version in pyproject.toml from 2.3.0 to 2.4.1.
- Updating the installation command in the GitHub Actions workflow (pythonapp.yml) accordingly.
- Modifying the torch version matrix in the minimal workflow (pythonapp-min.yml).
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
pyproject.toml | Updated minimum torch dependency and Black target versions |
.github/workflows/pythonapp.yml | Updated torch installation command to new dependency |
.github/workflows/pythonapp-min.yml | Revised torch version matrix for testing |
Files not reviewed (2)
- docs/requirements.txt: Language not supported
- setup.cfg: Language not supported
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
It's possible the CPU provided by the Windows runner is too old for PyTorch 2.7 which may now require instructions it doesn't have. |
The issue with Windows appears to be related to float 64 calculations, specifically with |
Description
This will update MONAI to be compatible with PyTorch 2.7. There appear to be few code changes with this release so hopefully this will be simply a matter of updating versions.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.