Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0cf49ca
Minor cleanup
ericspod May 18, 2026
7592c32
Updates, remove pytype and macOS tests
ericspod May 21, 2026
7693730
Fix for tests not compatible with PyTorch 2.12 yet
ericspod May 21, 2026
103bafd
Merge branch 'dev' into further_cicd_cleanup
ericspod May 21, 2026
2b77362
Fixing NGC script
ericspod May 21, 2026
6f2d047
Merge branch 'further_cicd_cleanup' of github.com:ericspod/MONAI into…
ericspod May 21, 2026
ec54565
NGC fix
ericspod May 22, 2026
2e89984
Run deploy for testing
ericspod May 22, 2026
f74022e
pip caching needs a requirements.txt file?
ericspod May 22, 2026
d99e97e
setuptools fix
ericspod May 22, 2026
fbe50f3
Removing pytype requirement
ericspod May 22, 2026
75e7861
Permissions update
ericspod May 22, 2026
1c97735
LMDB dataset fixes to account for recent changes
ericspod May 22, 2026
d3ac4e4
Merge branch 'further_cicd_cleanup' of github.com:ericspod/MONAI into…
ericspod May 22, 2026
d452bd6
Merge branch 'further_cicd_cleanup' of github.com:ericspod/MONAI into…
ericspod May 22, 2026
880dec9
Further fixes
ericspod May 22, 2026
55da7b6
Merge branch 'dev' into further_cicd_cleanup
ericspod May 22, 2026
c8459ca
Yaml fix
ericspod May 22, 2026
5de98fa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2026
5aeb06a
Fix
ericspod May 23, 2026
2f60913
Temporarily simply test process in coverage tests
ericspod May 26, 2026
a8447d8
Temporarily simply test process in coverage tests
ericspod May 26, 2026
84cca97
Adding pytest to get around cupy 14.1.0 bug
ericspod May 26, 2026
3d87a0e
Improve code coverage (hopefully)
ericspod May 26, 2026
ed76ae8
Dependabot updates
ericspod May 26, 2026
6d4e1f2
Try quick tests
ericspod May 26, 2026
bc422e3
Disable coverage tests, return to coverage testing later to run as a …
ericspod May 26, 2026
1adf887
precommit fix
ericspod May 26, 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
18 changes: 4 additions & 14 deletions .github/workflows/cicd_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
opt: ["codeformat", "pytype", "mypy"]
opt: ["codeformat", "mypy"] # "pytype" omitted for being essentially deprecated, see #8865
steps:
- name: Clean unused tools
run: |
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
os: [windows-latest, ubuntu-latest] # macOS-latest omitted for now for being very slow, see #8864
timeout-minutes: 120
env:
QUICKTEST: True
Expand Down Expand Up @@ -220,7 +220,6 @@ jobs:
- name: Install the complete dependencies
run: |
python -m pip install --user --upgrade pip wheel pybind11 # TODO: pybind11 added for macOS, may not be needed
#python -m pip install torch==${PYTORCH_VER1} torchvision==${TORCHVISION_VER1}
cat "requirements-dev.txt"
python -m pip install --no-build-isolation -r requirements-dev.txt
python -m pip list
Expand Down Expand Up @@ -267,8 +266,8 @@ jobs:
python -m pip install torch==${PYTORCH_VER1} torchvision --extra-index-url https://download.pytorch.org/whl/cpu
- name: Check packages
run: |
pip uninstall monai
pip list | grep -iv monai
python -m pip uninstall -y monai
python -m pip list | grep -iv monai
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
set -e

Expand Down Expand Up @@ -306,12 +305,3 @@ jobs:
python -m pip install ${name}[all] --extra-index-url https://download.pytorch.org/whl/cpu
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
python -c 'import monai; print(monai.__file__)'
- name: Quick test
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
run: |
# run min tests
cp ${{ steps.root.outputs.pwd }}/requirements*.txt .
cp -r ${{ steps.root.outputs.pwd }}/tests .
ls -al
python -m pip install --no-build-isolation -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
python -m unittest -v
19 changes: 7 additions & 12 deletions .github/workflows/cron-ngc-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,18 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: cache weekly timestamp
id: pip-cache
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
cache: pip
- name: Install CPU PyTorch
run: |
python -m pip install torch==2.8.0 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: |
rm -rf /github/home/.cache/torch/hub/bundle/
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
python -m pip install --no-build-isolation --upgrade pip wheel wheel-stub
python -m pip install --no-build-isolation -r requirements-dev.txt
- name: Loading Bundles
run: |
# clean up temporary files
$(pwd)/runtests.sh --build --clean
# run tests
python -m tests.ngc_bundle_download
PYTHONPATH=. python -m unittest tests.bundle.test_bundle_download.TestNgcBundleDownload
2 changes: 1 addition & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
ngc --version
BUILD_MONAI=1 ./runtests.sh --build --coverage --pytype --unittests --disttests # unit tests with pytype checks, coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with pytype checks, coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
ref: dev
- name: Download version
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: _version.py
- name: docker_build
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pythonapp-gpu.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Jenkinsfile.monai-premerge
name: premerge-gpu

on:
# quick tests for pull requests and the releasing branches
push:
branches:
- main
- releasing/*
pull_request:
types: [opened, synchronize, closed]
# on:
# # quick tests for pull requests and the releasing branches
# push:
# branches:
# - main
# - releasing/*
# pull_request:
# types: [opened, synchronize, closed]

concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Download version
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: _version.py
- name: Set tag
Expand Down
224 changes: 116 additions & 108 deletions .github/workflows/setupapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ name: deploy

on:
# full tests for all the important branches
push:
branches:
- main
- releasing/*
- feature/*
- dev
# push:
# branches:
# - main
# - releasing/*
# - feature/*
# - dev

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
Expand All @@ -20,98 +23,112 @@ jobs:
# - docker-py3-pip- (shared)
# - ubuntu 37 38 39 310-pip-
# - os-latest-pip (shared)
coverage-py3:
# if: github.repository == 'Project-MONAI/MONAI'
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
container:
image: nvcr.io/nvidia/pytorch:22.04-py3
options: --gpus all
runs-on: [self-hosted, linux, x64, integration]
steps:
- uses: actions/checkout@v6
- name: cache weekly timestamp
id: pip-cache
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
if: ${{ startsWith(github.ref, 'refs/heads/dev') }}
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install the dependencies
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip install --upgrade torch torchvision
python -m pip install -r requirements-dev.txt
- name: Run unit tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
python -m pip list
git config --global --add safe.directory /__w/MONAI/MONAI
git clean -ffdx
df -h
# python -m pip cache info
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
trap 'if pgrep python; then pkill python; fi;' ERR
python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
uses: codecov/codecov-action@v6
with:
fail_ci_if_error: false
files: ./coverage.xml

test-py3x:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install the dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install --no-build-isolation -r requirements-dev.txt
- name: Run quick tests CPU ubuntu
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
python -m pip list
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
BUILD_MONAI=0 ./runtests.sh --build --coverage --quick --unittests
BUILD_MONAI=1 ./runtests.sh --build --coverage --quick --min
coverage xml --ignore-errors
- name: Upload coverage
uses: codecov/codecov-action@v6
with:
fail_ci_if_error: false
files: ./coverage.xml
# TODO: coverage should be re-enable at a future time in PRs as well as longer running jobs, ideally with GPU support

# coverage-py3:
# # if: github.repository == 'Project-MONAI/MONAI'
# if: ${{ false }} # disable self-hosted job project-monai/monai#7039
# container:
# image: nvcr.io/nvidia/pytorch:22.04-py3
# options: --gpus all
# runs-on: [self-hosted, linux, x64, integration]
# steps:
# - uses: actions/checkout@v6
# - name: cache weekly timestamp
# id: pip-cache
# run: |
# echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
# - name: cache for pip
# if: ${{ startsWith(github.ref, 'refs/heads/dev') }}
# uses: actions/cache@v5
# id: cache
# with:
# path: |
# ~/.cache/pip
# ~/.cache/torch
# key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
# - name: Install the dependencies
# run: |
# which python
# python -m pip install --upgrade pip wheel wheel-stub
# python -m pip install --upgrade torch torchvision
# python -m pip install -r requirements-dev.txt
# - name: Run unit tests report coverage
# env:
# NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
# NGC_ORG: ${{ secrets.NGC_ORG }}
# NGC_TEAM: ${{ secrets.NGC_TEAM }}
# run: |
# python -m pip list
# git config --global --add safe.directory /__w/MONAI/MONAI
# git clean -ffdx
# df -h
# # python -m pip cache info
# nvidia-smi
# export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
# echo $CUDA_VISIBLE_DEVICES
# trap 'if pgrep python; then pkill python; fi;' ERR
# python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null &
# python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
# python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
# BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
# BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
# coverage xml --ignore-errors
# if pgrep python; then pkill python; fi
# shell: bash
# - name: Upload coverage
# uses: codecov/codecov-action@v6
# with:
# fail_ci_if_error: false
# files: ./coverage.xml


# test-py3x:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ['3.10', '3.11', '3.12']
# steps:
# - uses: actions/checkout@v6
# with:
# fetch-depth: 0
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v6
# with:
# python-version: ${{ matrix.python-version }}
# cache: pip
# - name: Install CPU PyTorch
# run: |
# python -m pip install --upgrade pip wheel wheel-stub
# python -m pip install torch==2.8.0 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
# - name: Install the dependencies
# run: |
# find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
# python -m pip install --no-build-isolation -r requirements-min.txt # necessary only here for some reason?
# python -m pip install --no-build-isolation -r requirements-dev.txt
# - name: Run quick tests CPU ubuntu
# env:
# NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
# NGC_ORG: ${{ secrets.NGC_ORG }}
# NGC_TEAM: ${{ secrets.NGC_TEAM }}
# TRANSFORMERS_VERBOSITY: error # stifle huggingface transformers warnings about aliases
# run: |
# python -m pip list
# python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
# BUILD_MONAI=0 python -m pip install --no-build-isolation -e .
# ./runtests.sh --coverage --quick --unittests --disttests

# # TODO: update installation process to allow testing with and without compiled libraries as intended here
# #BUILD_MONAI=0 ./runtests.sh --build --coverage --quick --unittests
# #./runtests.sh --clean
# #BUILD_MONAI=1 ./runtests.sh --build --coverage --quick --min
# coverage xml --ignore-errors
# - name: Upload coverage
# uses: codecov/codecov-action@v6
# with:
# fail_ci_if_error: false
# files: ./coverage.xml

install: # pip install from github url, the default branch is dev
runs-on: ubuntu-latest
Expand All @@ -120,18 +137,9 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: cache weekly timestamp
id: pip-cache
- name: Install CPU PyTorch
run: |
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
- name: cache for pip
uses: actions/cache@v5
id: cache
with:
path: |
~/.cache/pip
~/.cache/torch
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
python -m pip install torch==2.8.0 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
Loading
Loading