-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixing Numpy requirements to exclude 2.0 #7859
Conversation
Signed-off-by: Eric Kerfoot <[email protected]>
@wyli @pxLi @YanxuanLiu @KumoLiu @Nic-Ma I need one of you to initiate the Blossom tests to let this through. Other PRs can't pass because certain tests are failing if they install Numpy 2.0. We should update things to be compatible but this is the temporary fix we need for now. |
/build |
### Description This fixes the version of Numpy to be less than 2.0 so that we can get a working setup guaranteed. Numpy 2.0 isn't supported yet by MONAI and will need a number of changes to be compatible. This is only sometimes a problem because a number of dependencies we have require Numpy<2.0. When these are absent however, such as with minimal installs, Numpy 2.0 can be installed and causes problems. This is a temporary fix until we have worked out an update that's compatible with versions before and after 2.0. ### 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: Eric Kerfoot <[email protected]>
### Description This fixes the version of Numpy to be less than 2.0 so that we can get a working setup guaranteed. Numpy 2.0 isn't supported yet by MONAI and will need a number of changes to be compatible. This is only sometimes a problem because a number of dependencies we have require Numpy<2.0. When these are absent however, such as with minimal installs, Numpy 2.0 can be installed and causes problems. This is a temporary fix until we have worked out an update that's compatible with versions before and after 2.0. ### 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: Eric Kerfoot <[email protected]>
### Description This fixes the version of Numpy to be less than 2.0 so that we can get a working setup guaranteed. Numpy 2.0 isn't supported yet by MONAI and will need a number of changes to be compatible. This is only sometimes a problem because a number of dependencies we have require Numpy<2.0. When these are absent however, such as with minimal installs, Numpy 2.0 can be installed and causes problems. This is a temporary fix until we have worked out an update that's compatible with versions before and after 2.0. ### 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: Eric Kerfoot <[email protected]> Signed-off-by: MrGranddy <[email protected]>
### Description ### 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: Eric Kerfoot <[email protected]> Signed-off-by: Eric Kerfoot <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]>
Is there plans to make MONAI support Numpy v2 in the near future? |
Hi @MattTheCuber we are discussing developing a dependency update policy at #8303 so we can balance keeping older versions for those that need them against updating requirements appropriately. For Numpy 2 if you don't need to use any dependencies which do not work with it, you can install MONAI then upgrade the version of Numpy that gets installed. That should work as we've made MONAI compatible but added this exclusion to ensure the install process would produce a valid configuration. |
Ok, I don't need numpy v2 yet. I just wanted to see when we can upgrade our company's project to the latest version of the library as MONAI is the last limiting dependency. We use uv for dependency controls, so upgrading numpy after installing the deps is not ideal, we will continue waiting. Thank you for the update! |
Description
This fixes the version of Numpy to be less than 2.0 so that we can get a working setup guaranteed. Numpy 2.0 isn't supported yet by MONAI and will need a number of changes to be compatible.
This is only sometimes a problem because a number of dependencies we have require Numpy<2.0. When these are absent however, such as with minimal installs, Numpy 2.0 can be installed and causes problems. This is a temporary fix until we have worked out an update that's compatible with versions before and after 2.0.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.