Skip to content

Commit d3ac4e4

Browse files
committed
Merge branch 'further_cicd_cleanup' of github.com:ericspod/MONAI into further_cicd_cleanup
2 parents 1c97735 + fbe50f3 commit d3ac4e4

3 files changed

Lines changed: 60 additions & 59 deletions

File tree

.github/workflows/cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ jobs:
214214
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
215215
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
216216
ngc --version
217-
BUILD_MONAI=1 ./runtests.sh --build --coverage --pytype --unittests --disttests # unit tests with pytype checks, coverage report
217+
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with pytype checks, coverage report
218218
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
219219
coverage xml --ignore-errors
220220
if pgrep python; then pkill python; fi

.github/workflows/setupapp.yml

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -23,62 +23,63 @@ jobs:
2323
# - docker-py3-pip- (shared)
2424
# - ubuntu 37 38 39 310-pip-
2525
# - os-latest-pip (shared)
26-
coverage-py3:
27-
# if: github.repository == 'Project-MONAI/MONAI'
28-
if: ${{ false }} # disable self-hosted job project-monai/monai#7039
29-
container:
30-
image: nvcr.io/nvidia/pytorch:22.04-py3
31-
options: --gpus all
32-
runs-on: [self-hosted, linux, x64, integration]
33-
steps:
34-
- uses: actions/checkout@v6
35-
- name: cache weekly timestamp
36-
id: pip-cache
37-
run: |
38-
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
39-
- name: cache for pip
40-
if: ${{ startsWith(github.ref, 'refs/heads/dev') }}
41-
uses: actions/cache@v5
42-
id: cache
43-
with:
44-
path: |
45-
~/.cache/pip
46-
~/.cache/torch
47-
key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
48-
- name: Install the dependencies
49-
run: |
50-
which python
51-
python -m pip install --upgrade pip wheel wheel-stub
52-
python -m pip install --upgrade torch torchvision
53-
python -m pip install -r requirements-dev.txt
54-
- name: Run unit tests report coverage
55-
env:
56-
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
57-
NGC_ORG: ${{ secrets.NGC_ORG }}
58-
NGC_TEAM: ${{ secrets.NGC_TEAM }}
59-
run: |
60-
python -m pip list
61-
git config --global --add safe.directory /__w/MONAI/MONAI
62-
git clean -ffdx
63-
df -h
64-
# python -m pip cache info
65-
nvidia-smi
66-
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
67-
echo $CUDA_VISIBLE_DEVICES
68-
trap 'if pgrep python; then pkill python; fi;' ERR
69-
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 &
70-
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
71-
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
72-
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
73-
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
74-
coverage xml --ignore-errors
75-
if pgrep python; then pkill python; fi
76-
shell: bash
77-
- name: Upload coverage
78-
uses: codecov/codecov-action@v6
79-
with:
80-
fail_ci_if_error: false
81-
files: ./coverage.xml
26+
27+
# coverage-py3:
28+
# # if: github.repository == 'Project-MONAI/MONAI'
29+
# if: ${{ false }} # disable self-hosted job project-monai/monai#7039
30+
# container:
31+
# image: nvcr.io/nvidia/pytorch:22.04-py3
32+
# options: --gpus all
33+
# runs-on: [self-hosted, linux, x64, integration]
34+
# steps:
35+
# - uses: actions/checkout@v6
36+
# - name: cache weekly timestamp
37+
# id: pip-cache
38+
# run: |
39+
# echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
40+
# - name: cache for pip
41+
# if: ${{ startsWith(github.ref, 'refs/heads/dev') }}
42+
# uses: actions/cache@v5
43+
# id: cache
44+
# with:
45+
# path: |
46+
# ~/.cache/pip
47+
# ~/.cache/torch
48+
# key: docker-py3-pip-${{ steps.pip-cache.outputs.datew }}
49+
# - name: Install the dependencies
50+
# run: |
51+
# which python
52+
# python -m pip install --upgrade pip wheel wheel-stub
53+
# python -m pip install --upgrade torch torchvision
54+
# python -m pip install -r requirements-dev.txt
55+
# - name: Run unit tests report coverage
56+
# env:
57+
# NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
58+
# NGC_ORG: ${{ secrets.NGC_ORG }}
59+
# NGC_TEAM: ${{ secrets.NGC_TEAM }}
60+
# run: |
61+
# python -m pip list
62+
# git config --global --add safe.directory /__w/MONAI/MONAI
63+
# git clean -ffdx
64+
# df -h
65+
# # python -m pip cache info
66+
# nvidia-smi
67+
# export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
68+
# echo $CUDA_VISIBLE_DEVICES
69+
# trap 'if pgrep python; then pkill python; fi;' ERR
70+
# 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 &
71+
# python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
72+
# python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
73+
# BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
74+
# BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
75+
# coverage xml --ignore-errors
76+
# if pgrep python; then pkill python; fi
77+
# shell: bash
78+
# - name: Upload coverage
79+
# uses: codecov/codecov-action@v6
80+
# with:
81+
# fail_ci_if_error: false
82+
# files: ./coverage.xml
8283

8384
test-py3x:
8485
runs-on: ubuntu-latest
@@ -96,11 +97,12 @@ jobs:
9697
cache: pip
9798
- name: Install CPU PyTorch
9899
run: |
100+
python -m pip install --upgrade pip wheel wheel-stub
99101
python -m pip install torch==2.8.0 torchvision --extra-index-url https://download.pytorch.org/whl/cpu
100102
- name: Install the dependencies
101103
run: |
102104
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
103-
python -m pip install --no-build-isolation --upgrade pip wheel wheel-stub
105+
python -m pip install --no-build-isolation -r requirements-min.txt # necessary only here for some reason?
104106
python -m pip install --no-build-isolation -r requirements-dev.txt
105107
- name: Run quick tests CPU ubuntu
106108
env:

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pyflakes
1717
black>=26.3.1
1818
isort>=5.1, <6, !=6.0.0
1919
ruff>=0.14.11,<0.15
20-
pytype>=2020.6.1, <=2024.4.11; platform_system != "Windows"
2120
pybind11
2221
types-setuptools
2322
mypy>=1.5.0, <1.12.0

0 commit comments

Comments
 (0)