Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
47ffa19
Renaming file since we don't really do the CD part
ericspod Oct 22, 2026
987e122
Initial Update to remove Python 3.10
ericspod Oct 22, 2026
7ea874e
Version fix
ericspod Oct 25, 2026
b7a9b7e
Merge branch 'dev' into 9058_update_ci_versions
ericspod Nov 10, 2026
f1e3a02
Apply batched suggestions from code review
ericspod Nov 10, 2026
bdf7648
Updated PyTorch versions
ericspod Nov 10, 2026
2aa76d3
Merge branch '9058_update_ci_versions' of github.com:ericspod/MONAI i…
ericspod Nov 10, 2026
1b9ea4e
Apply batched suggestions from code review
ericspod Nov 10, 2026
3ae7320
Adapt testing data for new Matplotlib version
ericspod Nov 19, 2026
bb57f31
Merge branch '9058_update_ci_versions' of github.com:ericspod/MONAI i…
ericspod Nov 19, 2026
d51c616
Merge branch 'dev' into 9058_update_ci_versions
ericspod Nov 19, 2026
557bc80
Update tests and sphinx configuration
ericspod Nov 19, 2026
12ac72e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 19, 2026
6a1f44b
Docs fix
ericspod Nov 19, 2026
e4fb875
Merge branch '9058_update_ci_versions' of github.com:ericspod/MONAI i…
ericspod Nov 19, 2026
a8a1faa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 19, 2026
85d01d4
Review fixes
ericspod Nov 19, 2026
cc77d13
Reducing dependency list by referring to monai as its own dependency …
ericspod Nov 23, 2026
80d8486
Comment updates
ericspod Nov 23, 2026
cae464a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 23, 2026
3451458
Adding test
ericspod Nov 23, 2026
2a74555
Test update
ericspod Nov 23, 2026
fe2f971
Merge branch 'dev' into 9058_update_ci_versions
ericspod Nov 23, 2026
a19cfba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 23, 2026
6eeed58
Combine startswith
ericspod Nov 23, 2026
fd6b18a
Merge branch '9058_update_ci_versions' of github.com:ericspod/MONAI i…
ericspod Nov 23, 2026
45d1013
Merge branch 'dev' into 9058_update_ci_versions
ericspod Nov 23, 2026
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/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
env:
# minimum supported version of Python
PYTHON_VER1: '3.10'
PYTHON_VER1: '3.11'
# force installation of CPU-only PyTorch
PIP_EXTRA_INDEX_URL: 'https://download.pytorch.org/whl/cpu'
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ concurrency:
# Supported versions of Python and PyTorch are listed here for use below and as documentation
env:
# supported versions of Python
PYTHON_VER1: '3.10'
PYTHON_VER2: '3.11'
PYTHON_VER3: '3.12'
PYTHON_VER4: '3.13'
# PYTHON_VER5: '3.14' # TODO: not compatible with Torchscript, re-enable once Torchscript removed from MONAI
PYTHON_VER1: '3.11'
PYTHON_VER2: '3.12'
PYTHON_VER3: '3.13'
PYTHON_VER4: '3.14'
# PYTHON_VER5: '3.15' # TODO: not compatible with Torchscript, re-enable once Torchscript removed from MONAI
# supported versions of PyTorch
PYTORCH_VER1: '2.8.0'
PYTORCH_VER2: '2.9.1'
PYTORCH_VER3: '2.10.0'
PYTORCH_VER4: '2.11.0'
TORCHVISION_VER1: '0.23.0' # used for testing with lowest PyTorch version (PYTORCH_VER1), update as needed
PYTORCH_VER1: '2.12.1'
PYTORCH_VER2: '2.13.0'
PYTORCH_VER3: '2.14.1'
PYTORCH_VER4: '2.15.0'
TORCHVISION_VER1: '0.27.1' # used for testing with lowest PyTorch version (PYTORCH_VER1), update as needed

# versions of PyTorch/Torchvision to use for full-dep Windows tests, needed to get around a gloo bug
WIN_FULLDEP_VER: '2.11.0'
WIN_FULLDEP_VISION_VER: '0.26.0'
TQDM_DISABLE: 1 # squelch TQDM output to reduce log file size

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python # https://github.com/Project-MONAI/MONAI/issues/4354

# These jobs run the CICD tests, type checking, and testing packaging. These use the minimum supported versions of
PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster

# These jobs run the CI tests, type checking, and testing packaging. These use the minimum supported versions of
# Python and PyTorch in many places using the above environment variables but also hard coded where necessary.
# When support is dropped for a version it is important to update these as appropriate.

Expand Down Expand Up @@ -133,33 +133,35 @@ jobs:
# Base test cases are to test on all three OSes with the lowest versions of Python and PyTorch, other cases are
# added below as special cases to cover other Python and PyTorch versions under Ubuntu
os: [windows-latest, macOS-latest, ubuntu-latest]
python-version: ['3.10']
pytorch-version: ['2.8.0']
python-version: ['3.11']
pytorch-version: ['2.12.1']
include:
# Test Python versions under Ubuntu with lowest PyTorch version supported
- os: ubuntu-latest
pytorch-version: '2.8.0'
python-version: '3.11'
- os: ubuntu-latest
pytorch-version: '2.8.0'
pytorch-version: '2.12.1'
python-version: '3.12'
- os: ubuntu-latest
pytorch-version: '2.8.0'
pytorch-version: '2.12.1'
python-version: '3.13'
# - os: ubuntu-latest
# pytorch-version: '2.9.1'
# python-version: '3.14'
- os: ubuntu-latest
pytorch-version: '2.12.1'
python-version: '3.14'

# Test PyTorch versions under Ubuntu with lowest Python version supported
- os: ubuntu-latest
python-version: '3.10'
pytorch-version: '2.9.1'
python-version: '3.11'
pytorch-version: '2.13.0'
- os: ubuntu-latest
python-version: '3.11'
pytorch-version: '2.14.1'
- os: ubuntu-latest
python-version: '3.10'
pytorch-version: '2.10.0'
python-version: '3.11'
pytorch-version: '2.15.0'
Comment thread
ericspod marked this conversation as resolved.
Resolved

# Test newer Python with latest PyTorch under Ubuntu
- os: ubuntu-latest
python-version: '3.10'
pytorch-version: '2.11.0'
python-version: '3.12'
pytorch-version: '2.15.0'

timeout-minutes: 40
steps:
Expand Down Expand Up @@ -245,13 +247,8 @@ jobs:
run: |
which python
python -m pip install --upgrade pip wheel
- if: runner.os == 'windows' && needs.test_skip.outputs.skip == 0
name: Install torch cpu from pytorch.org (Windows only)
run: |
python -m pip install torch==${WIN_FULLDEP_VER} torchvision==${WIN_FULLDEP_VISION_VER}+cpu --index-url https://download.pytorch.org/whl/cpu
shell: bash
- if: runner.os != 'windows' && needs.test_skip.outputs.skip == 0
name: Install torch gpu
- if: needs.test_skip.outputs.skip == 0
name: Install PyTorch
run: |
# install the lowest version of PyTorch supported
python -m pip install torch==${PYTORCH_VER1} torchvision==${TORCHVISION_VER1}
Expand Down Expand Up @@ -297,7 +294,7 @@ jobs:
# (1) the HyenaND operators import only torch + einops + omegaconf at runtime, so
# skipping the (still batteries-included: datasets/lightning/wandb) core deps
# keeps this job lean; and
# (2) nvsubquadratic pins torch>=2.10,<2.11, which would otherwise upgrade/clash
# (2) nvsubquadratic 0.2.0 pins torch>=2.14.0,<2.15.0, which would otherwise upgrade/clash
# with the torch this job (and MONAI's matrix) installs.
# CUDA-required Hyena tests skip cleanly here; the GPU surface is covered by
# ``.github/workflows/pythonapp-hyena-gpu.yml``.
Expand All @@ -324,7 +321,7 @@ jobs:
python -m pip install --upgrade pip wheel tomli pytest
# need a specific version of torch for nvsubquadratic
python monai/config/print_dependencies.py build-system | \
xargs -d '\n' pip install --no-build-isolation torch==2.10.0 torchvision==0.25.0
xargs -d '\n' pip install --no-build-isolation
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
# # nvsubquadratic runtime imports need only torch + einops + omegaconf; install
# # the package itself without its core dependency tree (see job comment above).
python -m pip install --no-build-isolation omegaconf
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
timeout-minutes: 46 # equal to max + 3*std over the last 600 successful runs
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cron-ngc-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
cache: pip
- name: Install CPU PyTorch
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
with:
ref: dev
fetch-depth: 0
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- shell: bash
run: |
git describe
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

if [ ${{ matrix.environment }} = "PT230+CUDA124" ]
then
PYVER=3.10 PYSFX=3 DISTUTILS=python3-distutils && \
PYVER=3.11 PYSFX=3 DISTUTILS=python3-distutils && \
apt-get update && apt-get install -y --no-install-recommends \
curl \
pkg-config \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
python-version: ['3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -67,22 +67,22 @@ jobs:
env:
QUICKTEST: True

- if: matrix.python-version == '3.10' && startsWith(github.ref, 'refs/tags/')
- if: matrix.python-version == '3.11' && startsWith(github.ref, 'refs/tags/')
name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/

- if: matrix.python-version == '3.10' && startsWith(github.ref, 'refs/tags/')
- if: matrix.python-version == '3.11' && startsWith(github.ref, 'refs/tags/')
name: Check artifacts
run: |
ls -al dist/
rm dist/monai*.tar.gz
ls -al dist/

# remove publishing to Test PyPI as it is moved to blossom
# - if: matrix.python-version == '3.10' && startsWith(github.ref, 'refs/tags/')
# - if: matrix.python-version == '3.11' && startsWith(github.ref, 'refs/tags/')
# name: Publish to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
Expand All @@ -100,10 +100,10 @@ jobs:
# full history so that we can git describe
with:
fetch-depth: 0
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- shell: bash
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/setupapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ['3.10', '3.11', '3.12']
# python-version: ['3.11', '3.12']
# steps:
# - uses: actions/checkout@v7
# with:
Expand Down Expand Up @@ -136,13 +136,13 @@ jobs:
install: # pip install from github url, the default branch is dev
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.11'
- name: Install CPU PyTorch
run: |
python -m pip install torch==2.8.0 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
python -m pip install torch==2.12.1 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install the default branch no build (dev branch only)
if: github.ref == 'refs/heads/dev'
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/weekly-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:


env:
PYTHON_VER: '3.10'
PYTORCH_VER: '2.8.0'
PYTHON_VER: '3.11'
PYTORCH_VER: '2.12.1'
PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster

jobs:
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
# remove git clone dependencies, see https://github.com/Project-MONAI/MONAI/issues/5882
sed -i /git+/d pyproject.toml
sed -i 's/name\ =\ "monai"$/name\ =\ "monai-weekly"/g' pyproject.toml
sed -i 's/"monai\[/"monai-weekly[/g' pyproject.toml
echo "__commit_id__ = \"$HEAD_COMMIT_ID\"" >> monai/__init__.py
git diff pyproject.toml monai/__init__.py
git config user.name "CI Builder"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ runs
*.pth

*zarr/*

uv.lock
2 changes: 1 addition & 1 deletion docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"
sphinx:
configuration: docs/source/conf.py
python:
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch>=2.8.0
torch>=2.12.1
numpy>=1.24,<3.0
pytorch-ignite
itk>=5.2
Expand Down Expand Up @@ -32,7 +32,7 @@ jsonschema
pynrrd
pydicom
h5py
nni==2.10.1; platform_system == "Linux" and "arm" not in platform_machine and "aarch" not in platform_machine
nni; platform_system == "Linux" and "arm" not in platform_machine and "aarch" not in platform_machine
filelock<3.12.0
optuna
opencv-python-headless
Expand Down
10 changes: 10 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,23 @@ def generate_apidocs(*args):
"sphinx_autodoc_typehints",
]

intersphinx_mapping = {
"pytorch": ("https://docs.pytorch.org/docs/stable/", None),
"monai": ("https://monai.readthedocs.io/en/stable/", None),
}

# FIXME: find solution for these warnings related to docs in PyTorch which get inherited but can't be resolved:
# "monai/data/meta_tensor.py:docstring of monai.data.MetaTensor.index_add_:16: WARNING: unknown document: '/notes/randomness' [ref.doc])
suppress_warnings = ["ref.doc"]

autoclass_content = "class"
add_module_names = True
source_encoding = "utf-8"
autosectionlabel_prefix_document = True
napoleon_use_param = True
napoleon_include_init_with_doc = True
set_type_checking_flag = True
autodoc_use_legacy_class_based = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

---

MONAI's core functionality is written in Python 3 (>= 3.10) and only requires [Numpy](https://numpy.org/) and [PyTorch](https://pytorch.org/).
MONAI's core functionality is written in Python 3 (>= 3.11) and only requires [Numpy](https://numpy.org/) and [PyTorch](https://pytorch.org/).

The package is currently distributed via Github as the primary source code repository,
and the Python package index (PyPI). The pre-built Docker images are made available on DockerHub.
Expand Down Expand Up @@ -353,6 +353,6 @@ this will install PyTorch as well as `pytorch-cuda`, please follow https://pytor
```bash
git clone https://github.com/Project-MONAI/MONAI.git
cd MONAI/
conda create -n <name> python=<ver> # eg 3.10
conda create -n <name> python=<ver> # eg 3.11
conda env update -n <name> -f environment-dev.yml
```
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: monai
channels:
- defaults
dependencies:
- python>=3.10
- python>=3.11
- pip
- pip:
- -e .[all,testing]
2 changes: 1 addition & 1 deletion monai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def filter(self, record):


PY_REQUIRED_MAJOR = 3
PY_REQUIRED_MINOR = 9
PY_REQUIRED_MINOR = 11

version_dict = get_versions()
__version__: str = str(version_dict.get("version", "0+unknown"))
Expand Down
2 changes: 1 addition & 1 deletion monai/apps/auto3dseg/auto_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ def set_device_info(
cmd_prefix: command line prefix for subprocess running in BundleAlgo and EnsembleRunner.
Default using env "CMD_PREFIX" or None, examples are:

- single GPU/CPU or multinode bcprun: "python " or "/opt/conda/bin/python3.10",
- single GPU/CPU or multinode bcprun: "python " or "/opt/conda/bin/python3.11",
- single node multi-GPU running "torchrun --nnodes=1 --nproc_per_node=2 "

If user define this prefix, please make sure --nproc_per_node matches cuda_visible_device or
Expand Down
2 changes: 1 addition & 1 deletion monai/auto3dseg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def _prepare_cmd_default(cmd: str, cmd_prefix: str | None = None, **kwargs: Any)
Args:
cmd: the command or script to run in the distributed job.
cmd_prefix: the command prefix to run the script,
e.g., "python", "python -m", "python3", "/opt/conda/bin/python3.10".
e.g., "python", "python -m", "python3", "/opt/conda/bin/python3.11".
kwargs: the keyword arguments to be passed to the script.

Returns:
Expand Down
Loading
Loading