Skip to content

Temporarily Restrict setuptools Version to 79.0.1 #8441

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

Merged
merged 5 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pytorch-version: ['2.3.1', '2.4.1', '2.5.1', 'latest']
pytorch-version: ['2.4.1', '2.5.1', '2.6.0'] # FIXME: add 'latest' back once PyTorch 2.7 issues are resolved
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
# install the latest pytorch for testing
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
# fresh torch installation according to pyproject.toml
python -m pip install torch>=2.3.0 torchvision
python -m pip install torch>=2.4.1 torchvision
- name: Check packages
run: |
pip uninstall monai
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-f https://download.pytorch.org/whl/cpu/torch-2.3.0%2Bcpu-cp39-cp39-linux_x86_64.whl
torch>=2.3.0
torch>=2.4.1, <2.7.0
pytorch-ignite==0.4.11
numpy>=1.20
itk>=5.2
Expand Down
2 changes: 1 addition & 1 deletion monai/networks/schedulers/ddpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def step(
pred_prev_sample = pred_original_sample_coeff * pred_original_sample + current_sample_coeff * sample

# 6. Add noise
variance = 0
variance: torch.Tensor = torch.tensor(0)
if timestep > 0:
noise = torch.randn(
model_output.size(),
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
requires = [
"wheel",
"setuptools",
"torch>=2.3.0",
"torch>=2.4.1, <2.7.0",
"ninja",
"packaging"
]

[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310']
target-version = ['py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
exclude = '''
(
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mccabe
pep8-naming
pycodestyle
pyflakes
black>=22.12
black>=25.1.0
isort>=5.1, <6.0
ruff
pytype>=2020.6.1; platform_system != "Windows"
Expand Down
2 changes: 1 addition & 1 deletion requirements-min.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requirements for minimal tests
-r requirements.txt
setuptools>=50.3.0,<66.0.0,!=60.6.0 ; python_version < "3.12"
setuptools>=70.2.0; python_version >= "3.12"
setuptools>=70.2.0,<=79.0.1; python_version >= "3.12"
coverage>=5.5
parameterized
packaging
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
torch>=2.3.0; sys_platform != 'win32'
torch>=2.4.1; sys_platform == 'win32'
torch>=2.4.1, <2.7.0
numpy>=1.24,<3.0
Copy link
Contributor

Choose a reason for hiding this comment

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

@ericspod Was it intentional to also bump the minimum torch on non-Windows platforms from 2.3.0 to 2.4.1?

Copy link
Member

Choose a reason for hiding this comment

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

It was yes, we intend to support the previous three versions of Pytorch so 2.3 fell out of official support for MONAI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you all have plans to document these type of decisions as part of #8303? And for addressing #8380?

3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ setup_requires =
ninja
packaging
install_requires =
torch>=2.3.0; sys_platform != 'win32'
torch>=2.4.1; sys_platform == 'win32'
torch>=2.4.1, <2.7.0
numpy>=1.24,<3.0

[options.extras_require]
Expand Down
Loading