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

Dependency Version/Deprecation Policy #8303

Open
ericspod opened this issue Jan 17, 2025 · 2 comments
Open

Dependency Version/Deprecation Policy #8303

ericspod opened this issue Jan 17, 2025 · 2 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@ericspod
Copy link
Member

MONAI has an existing policy for deprecating components it defines here. For dependencies there isn't as clear a policy to follow in regards to which versions of Python, Numpy, Pytorch, etc. to support. It's important to support older environments as much as is practical so that users with frozen environments have the fewest issues with new versions of MONAI. There are a few considerations that vary by library which need to be composed into a clear policy:

  • Python versions of have end-of-life dates and so we should support only those versions that haven't reached that date.
  • Pytorch's releases have for a long time never been out of sync, that is there have been no bug fixes for old versions for a very long time, and so old versions immediately become out-of-support. This is an issue with known security vulnerabilities in older versions which won't be fixed, so Bump min torch to 1.13.1 to mitigate CVE-2022-45907 unsafe usage of eval #8296 has been proposed to remove old versions from the CICD system. A subsequent PR will remove more versions further as discussed here .
  • Numpy has released version 2.x which introduced some incompatibilities with other dependencies, though MONAI itself should be compatible. This has created the situation where we have to specify that MONAI requires 1.x to prevent pip from installing incompatible combinations of libraries. At some point this will be fixed and the version restriction can be removed.
  • Other dependencies may deprecate versions, or vulnerabilities discovered for them.

All this means we need to determine:

  • How old are the versions of dependencies we want to support.
  • How to decide when to remove support for certain dependency versions and by whom.
  • How to respond to discovered vulnerabilities.
  • How and when to re-analize the dependencies that we have to determine if version requirements are still suitable.
  • Who may add or remove dependencies, even optional ones.
  • Who may mark other repositories as archived or de-archive them (I'm thinking specifically of archiving GenerativeModels).
@ericspod ericspod added the dependencies Pull requests that update a dependency file label Jan 17, 2025
@jamesobutler
Copy link
Contributor

jamesobutler commented Jan 20, 2025

This has created the situation where we have to specify that MONAI requires 1.x to prevent pip from installing incompatible combinations of libraries.

I would suggest the creation of a new GitHub issue documenting which monai dependency does not have support for numpy 2 which is preventing the numpy < 2 from being removed. Most major python packages have been updated to be compatible with both Numpy 1 and 2 by following https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice. The numpy GitHub repository has a pinned issue about numpy 2 ecosystem compatibility detailing which versions of major python packages added numpy 2 support.

@jamesobutler
Copy link
Contributor

How old are the versions of dependencies we want to support.

As it relates to versions of dependencies to support as well as versions of Python to support, my recommendation would be to consider adopting SPEC0. This is because monai is ultimately dependent on the core base of numpy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Status: No status
Development

No branches or pull requests

5 participants