Skip to content

Commit

Permalink
Merge pull request #460 from Project-MONAI/dev
Browse files Browse the repository at this point in the history
merge master
  • Loading branch information
Nic-Ma authored Mar 16, 2023
2 parents 6b63f3e + 678b512 commit 394c31b
Show file tree
Hide file tree
Showing 1,103 changed files with 21,550 additions and 7,609 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "monthly"
2 changes: 1 addition & 1 deletion .github/workflows/blossom-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ fromJson(needs.Authorization.outputs.args).repo }}
ref: ${{ fromJson(needs.Authorization.outputs.args).ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: dispatch
uses: peter-evans/slash-command-dispatch@v1.2.0
uses: peter-evans/slash-command-dispatch@v3.0.1
with:
token: ${{ secrets.PR_MAINTAIN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:

- name: Build
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements-dev.txt
BUILD_MONAI=1 ./runtests.sh --build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
os: [ubuntu-latest]
python-version: ["3.9"]
runs-on: ${{ matrix.os }}
env:
QUICKTEST: True
steps:
- if: runner.os == 'windows'
name: Config pagefile (Windows only)
uses: al-cheb/configure-pagefile-action@v1.2
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 8
maximum-size: 16
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- "PT191+CUDA113"
- "PT110+CUDA113"
- "PT112+CUDA113"
- "PTLATEST+CUDA117"
- "PTLATEST+CUDA118"
include:
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes
- environment: PT182+CUDA102
Expand All @@ -32,9 +32,9 @@ jobs:
- environment: PT112+CUDA113
pytorch: "torch==1.12.1 torchvision==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu113"
base: "nvcr.io/nvidia/pytorch:21.06-py3" # CUDA 11.3
- environment: PTLATEST+CUDA117
pytorch: "-U torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117"
base: "nvcr.io/nvidia/pytorch:22.08-py3" # CUDA 11.7
- environment: PTLATEST+CUDA118
pytorch: "-U torch torchvision --extra-index-url https://download.pytorch.org/whl/cu118"
base: "nvcr.io/nvidia/pytorch:22.12-py3" # CUDA 11.8
container:
image: ${{ matrix.base }}
options: "--gpus all"
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
if: github.repository == 'Project-MONAI/MONAI'
strategy:
matrix:
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.10"] # 21.02, 21.10 for backward comp.
container: ["pytorch:22.09", "pytorch:22.11", "pytorch:22.12"]
container:
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
options: "--gpus all"
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
if: github.repository == 'Project-MONAI/MONAI'
strategy:
matrix:
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.10"] # 21.02, 21.10 for backward comp.
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.12"] # 21.02, 21.10 for backward comp.
container:
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
options: "--gpus all"
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
if: github.repository == 'Project-MONAI/MONAI'
needs: cron-gpu # so that monai itself is verified first
container:
image: nvcr.io/nvidia/pytorch:22.10-py3 # testing with the latest pytorch base image
image: nvcr.io/nvidia/pytorch:22.12-py3 # testing with the latest pytorch base image
options: "--gpus all --ipc=host"
runs-on: [self-hosted, linux, x64, integration]
steps:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ jobs:
with:
ref: dev
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- shell: bash
run: |
git describe
python -m pip install -U pip wheel setuptools
python setup.py build
cat build/lib/monai/_version.py
- name: Upload version
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: _version.py
path: build/lib/monai/_version.py
Expand All @@ -55,18 +56,13 @@ jobs:
with:
ref: dev
- name: Download version
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: _version.py
- name: Install Latest Docker
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
- name: docker_build
shell: bash
run: |
docker --version
# get tag info for versioning
cat _version.py
mv _version.py monai/
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ jobs:
run: |
which python
python -m pip install --upgrade pip wheel
python -m pip uninstall -y torch torchvision
python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116
python -m pip install --upgrade torch torchvision
python -m pip install -r requirements-dev.txt
rm -rf /github/home/.cache/torch/hub/mmars/
- name: Run integration tests
run: |
python -m pip list
git config --global --add safe.directory /__w/MONAI/MONAI
git clean -ffdx
nvidia-smi
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
echo $CUDA_VISIBLE_DEVICES
Expand All @@ -53,7 +54,7 @@ jobs:
if pgrep python; then pkill python; fi
shell: bash
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v2
if: github.event.pull_request.number != ''
with:
token: ${{ secrets.PR_MAINTAIN }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
# - os-latest-pip- (shared)
flake8-py3:
runs-on: ubuntu-latest
strategy:
matrix:
opt: ["codeformat", "pytype", "mypy"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
Expand All @@ -46,8 +49,8 @@ jobs:
run: |
# clean up temporary files
$(pwd)/runtests.sh --build --clean
# Git hub actions have 2 cores, so parallize pytype
$(pwd)/runtests.sh --build --codeformat -j 2
# Github actions have 2 cores, so parallelize pytype
$(pwd)/runtests.sh --build --${{ matrix.opt }} -j 2
quick-py3: # full dependencies installed tests for different OS
runs-on: ${{ matrix.os }}
Expand All @@ -59,7 +62,7 @@ jobs:
steps:
- if: runner.os == 'windows'
name: Config pagefile (Windows only)
uses: al-cheb/configure-pagefile-action@v1.2
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 8
maximum-size: 16
Expand Down Expand Up @@ -101,8 +104,7 @@ jobs:
python -m pip list
python setup.py develop # test no compile installation
shell: bash
- if: runner.os != 'windows'
name: Run compiled (${{ runner.os }})
- name: Run compiled (${{ runner.os }})
run: |
python setup.py develop --uninstall
BUILD_MONAI=1 python setup.py develop # compile the cpp extensions
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- if: matrix.python-version == '3.8' && startsWith(github.ref, 'refs/tags/')
name: Upload artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
python setup.py build
cat build/lib/monai/_version.py
- name: Upload version
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: _version.py
path: build/lib/monai/_version.py
Expand All @@ -122,7 +122,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Download version
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: _version.py
- name: Set tag
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weekly-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
export YEAR_WEEK=$(date +'%y%U')
echo "Year week for tag is ${YEAR_WEEK}"
if ! [[ $YEAR_WEEK =~ ^[0-9]{4}$ ]] ; then echo "Wrong 'year week' format. Should be 4 digits."; exit 1 ; fi
git tag "1.1.dev${YEAR_WEEK}"
git tag "1.2.dev${YEAR_WEEK}"
git log -1
git tag --list
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ tests/testing_data/endo.mp4
tests/testing_data/ultrasound.avi
tests/testing_data/train_data_stats.yaml
tests/testing_data/eval_data_stats.yaml
tests/testing_data/CT_2D_head_fixed.mha
tests/testing_data/CT_2D_head_moving.mha

# clang format tool
.clang-format-bin/
Expand Down
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -28,7 +28,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand All @@ -54,11 +54,12 @@ repos:
exclude: |
(?x)^(
monai/__init__.py|
docs/source/conf.py
docs/source/conf.py|
tests/utils.py
)$
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
rev: v2.1.2
hooks:
- id: pycln
args: [--config=pyproject.toml]
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: "MONAI: Medical Open Network for AI"
abstract: "AI Toolkit for Healthcare Imaging"
authors:
- name: "MONAI Consortium"
date-released: 2022-09-16
version: "1.0.0"
date-released: 2022-12-19
version: "1.1.0"
identifiers:
- description: "This DOI represents all versions of MONAI, and will always resolve to the latest one."
type: doi
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# To build with a different base image
# please run `docker build` using the `--build-arg PYTORCH_IMAGE=...` flag.
ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:22.10-py3
ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:22.12-py3
FROM ${PYTORCH_IMAGE}

LABEL maintainer="monai.contact@gmail.com"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ Examples and notebook tutorials are located at [Project-MONAI/tutorials](https:/

Technical documentation is available at [docs.monai.io](https://docs.monai.io).

## Citation

If you have used MONAI in your research, please cite us! The citation can be exported from: https://arxiv.org/abs/2211.02701.

## Model Zoo
[The MONAI Model Zoo](https://github.com/Project-MONAI/model-zoo) is a place for researchers and data scientists to share the latest and great models from the community.
Utilizing [the MONAI Bundle format](https://docs.monai.io/en/latest/bundle_intro.html) makes it easy to [get started](https://github.com/Project-MONAI/tutorials/tree/main/model_zoo) building workflows with MONAI.
Expand Down
13 changes: 7 additions & 6 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-f https://download.pytorch.org/whl/cpu/torch-1.12.1%2Bcpu-cp37-cp37m-linux_x86_64.whl
torch>=1.8
pytorch-ignite==0.4.10
numpy>=1.17
pytorch-ignite==0.4.11
numpy>=1.20
itk>=5.2
nibabel
parameterized
scikit-image>=0.14.2
scikit-image>=0.19.0
tensorboard
commonmark==0.9.1
recommonmark==0.6.0
Expand All @@ -21,10 +21,11 @@ sphinx-autodoc-typehints==1.11.1
pandas
einops
transformers<4.22 # https://github.com/Project-MONAI/MONAI/issues/5157
mlflow
mlflow>=1.28.0
clearml >=1.10.0rc0
tensorboardX
imagecodecs; platform_system == "Linux"
tifffile; platform_system == "Linux"
imagecodecs; platform_system == "Linux" or platform_system == "Darwin"
tifffile; platform_system == "Linux" or platform_system == "Darwin"
pyyaml
fire
jsonschema
Expand Down
Binary file added docs/source/MONAI-logo-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ The following figure shows the detection training and inference workflows:
![detection workflow](../images/detection.png)

### Reproducing the state-of-the-art Kaggle competition solutions
[A reimplementation](https://github.com/Project-MONAI/tutorials/tree/master/kaggle/RANZCR/4th_place_solution) of the 4th place solution of RANZCR CLiP - Catheter and Line Position Challenge in Kaggle: https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification
[A reimplementation](https://github.com/Project-MONAI/tutorials/tree/main/competitions/kaggle/RANZCR/4th_place_solution) of the 4th place solution of RANZCR CLiP - Catheter and Line Position Challenge in Kaggle: https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification
1 change: 1 addition & 0 deletions docs/source/bundle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Model Bundle
---------------
.. autoclass:: ConfigParser
:members:
:special-members:

`Scripts`
---------
Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ def generate_apidocs(*args):
"collapse_navigation": True,
"navigation_depth": 3,
"show_toc_level": 1,
"footer_items": ["copyright"],
"footer_start": ["copyright"],
"navbar_align": "content",
"logo": {"image_light": "MONAI-logo-color.png", "image_dark": "MONAI-logo-color.png"},
}
html_context = {
"github_user": "Project-MONAI",
Expand Down
Loading

0 comments on commit 394c31b

Please sign in to comment.