Skip to content
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

Changing Numpy version limit to include 2.x but not a theoretical 3.x #8309

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

ericspod
Copy link
Member

Partially addresses #8303.

Description

This changes the maximum Numpy version to be below 3.0 for testing with 2.x compatibility. This appears to be resolved with newer versions of dependencies.

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.

Copy link
Contributor

@jamesobutler jamesobutler left a comment

Choose a reason for hiding this comment

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

@ericspod I would suggest updating the automated workflow so that when it tests older torch versions (pre-2.3.0 which don’t have numpy 2 support), to python -m pip install numpy<2 just before the torch install linked below. This should keep this numpy 1 version as torch is installed and as well as when MONAI gets installed afterwards. With this PR’s change, having numpy<2 already installed with an older torch is fine and will meet the install_requires for MONAI when it goes to get installed and won’t force the upgrade of them.

python -m pip install torch==${{ matrix.pytorch-version }}

@ericspod
Copy link
Member Author

@ericspod I would suggest updating the automated workflow so that when it tests older torch versions (pre-2.3.0 which don’t have numpy 2 support), to python -m pip install numpy<2

Thanks for the suggestion, that would fix this PR however we wouldn't resolve the version issue during installation. Users would still need to pre-install Numpy like this. This PR was more an experiment to see what version updates we can do and where the pain points were. We're still discussing the version policy which will change what we do here as well, and hopefully resolve this Numpy issue.

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