Skip to content

Commit

Permalink
Merge branch 'Project-MONAI:dev' into model-calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
Bala93 authored Aug 3, 2024
2 parents 24efd85 + ae5a04d commit 0067953
Show file tree
Hide file tree
Showing 185 changed files with 20,387 additions and 810 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/blossom-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:
args: ${{ env.args }}

# This job only runs for pull request comments
if: contains('\
Nic-Ma,\
wyli,\
pxLi,\
YanxuanLiu,\
KumoLiu,\
', format('{0},', github.actor)) && github.event.comment.body == '/build'
if: |
github.event.comment.body == '/build' &&
(
github.actor == 'Nic-Ma' ||
github.actor == 'wyli' ||
github.actor == 'pxLi' ||
github.actor == 'YanxuanLiu' ||
github.actor == 'KumoLiu'
)
steps:
- name: Check if comment is issued by authorized person
run: blossom-ci
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
maximum-size: 16GB
disk-root: "D:"
- uses: actions/checkout@v4
- name: Clean up disk space
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
rm -rf /usr/share/dotnet/
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
Expand All @@ -56,6 +60,10 @@ jobs:
conda deactivate
- name: Test env (CPU ${{ runner.os }})
shell: bash -el {0}
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
conda activate monai
$(pwd)/runtests.sh --build --unittests
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 @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
python -m pip install -r requirements-dev.txt
python -m pip list
- name: Run tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ]
echo "Sleep $LAUNCH_DELAY"
Expand Down Expand Up @@ -94,6 +98,10 @@ jobs:
python -m pip install -r requirements-dev.txt
python -m pip list
- name: Run tests report coverage
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ]
echo "Sleep $LAUNCH_DELAY"
Expand Down Expand Up @@ -196,6 +204,10 @@ jobs:
- name: Run tests report coverage
# The docker image process has done the compilation.
# BUILD_MONAI=1 is necessary for triggering the USE_COMPILED flag.
env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: |
cd /opt/monai
nvidia-smi
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ jobs:
shell: bash
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
shell: bash
env:
BUILD_MONAI: 1
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
run: ./runtests.sh --build --net

- name: Add reaction
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 @@ -62,7 +62,7 @@ jobs:
if [ ${{ matrix.environment }} = "PT110+CUDA111" ] || \
[ ${{ matrix.environment }} = "PT113+CUDA116" ]
then
PYVER=3.8 PYSFX=3 DISTUTILS=python3-distutils && \
PYVER=3.9 PYSFX=3 DISTUTILS=python3-distutils && \
apt-get update && apt-get install -y --no-install-recommends \
curl \
pkg-config \
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/pythonapp-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: Prepare pip wheel
run: |
which python
Expand Down Expand Up @@ -67,13 +67,16 @@ jobs:
shell: bash
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}

min-dep-py3: # min dependencies installed tests for different python
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -112,20 +115,23 @@ jobs:
./runtests.sh --min
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}

min-dep-pytorch: # min dependencies installed tests for different pytorch
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pytorch-version: ['1.9.1', '1.10.2', '1.11.0', '1.12.1', '1.13', 'latest']
pytorch-version: ['1.10.2', '1.11.0', '1.12.1', '1.13', '2.0.1', 'latest']
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: Prepare pip wheel
run: |
which python
Expand Down Expand Up @@ -161,3 +167,6 @@ jobs:
./runtests.sh --min
env:
QUICKTEST: True
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
NGC_ORG: ${{ secrets.NGC_ORG }}
NGC_TEAM: ${{ secrets.NGC_TEAM }}
14 changes: 8 additions & 6 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
opt: ["codeformat", "pytype", "mypy"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
Expand All @@ -45,6 +45,7 @@ jobs:
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- name: Lint and type check
Expand Down Expand Up @@ -130,10 +131,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
Expand All @@ -148,6 +149,7 @@ jobs:
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
python -m pip install --user --upgrade pip setuptools wheel twine
# install the latest pytorch for testing
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
Expand Down Expand Up @@ -211,10 +213,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/setupapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
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
Expand Down Expand Up @@ -77,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -104,6 +108,10 @@ jobs:
python -m pip install --upgrade pip wheel
python -m pip install -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))'
Expand All @@ -119,10 +127,10 @@ jobs:
install: # pip install from github url, the default branch is dev
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: cache weekly timestamp
id: pip-cache
run: |
Expand Down
2 changes: 1 addition & 1 deletion .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.4.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [1.3.2] - 2024-06-25
### Fixed
#### misc.
* Updated Numpy version constraint to < 2.0 (#7859)

## [1.3.1] - 2024-05-17
### Added
* Support for `by_measure` argument in `RemoveSmallObjects` (#7137)
Expand Down Expand Up @@ -1035,7 +1040,8 @@ the postprocessing steps should be used before calling the metrics methods

[highlights]: https://github.com/Project-MONAI/MONAI/blob/master/docs/source/highlights.md

[Unreleased]: https://github.com/Project-MONAI/MONAI/compare/1.3.1...HEAD
[Unreleased]: https://github.com/Project-MONAI/MONAI/compare/1.3.2...HEAD
[1.3.2]: https://github.com/Project-MONAI/MONAI/compare/1.3.1...1.3.2
[1.3.1]: https://github.com/Project-MONAI/MONAI/compare/1.3.0...1.3.1
[1.3.0]: https://github.com/Project-MONAI/MONAI/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/Project-MONAI/MONAI/compare/1.1.0...1.2.0
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: 2024-05-21
version: "1.3.1"
date-released: 2024-06-26
version: "1.3.2"
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ or (for new features that would not break existing functionality):
```

It is recommended that the new test `test_[module_name].py` is constructed by using only
python 3.8+ build-in functions, `torch`, `numpy`, `coverage` (for reporting code coverages) and `parameterized` (for organising test cases) packages.
python 3.9+ build-in functions, `torch`, `numpy`, `coverage` (for reporting code coverages) and `parameterized` (for organising test cases) packages.
If it requires any other external packages, please make sure:
- the packages are listed in [`requirements-dev.txt`](requirements-dev.txt)
- the new test `test_[module_name].py` is added to the `exclude_cases` in [`./tests/min_tests.py`](./tests/min_tests.py) so that
Expand Down
2 changes: 1 addition & 1 deletion docs/images/python.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ itk>=5.2
nibabel
parameterized
scikit-image>=0.19.0
scipy>=1.7.1
scipy>=1.12.0; python_version >= '3.9'
tensorboard
commonmark==0.9.1
recommonmark==0.6.0
Expand Down Expand Up @@ -40,3 +40,4 @@ onnx>=1.13.0
onnxruntime; python_version <= '3.10'
zarr
huggingface_hub
pyamg>=5.0.0
8 changes: 8 additions & 0 deletions docs/source/apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,11 @@ FastMRIReader

.. autoclass:: monai.apps.nnunet.nnUNetV2Runner
:members:

`Generative AI`
---------------

`MAISI Utilities`
~~~~~~~~~~~~~~~~~
.. automodule:: monai.apps.generation.maisi.utils.morphological_ops
:members:
5 changes: 5 additions & 0 deletions docs/source/engines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ Workflows
.. autoclass:: GanTrainer
:members:

`AdversarialTrainer`
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: AdversarialTrainer
:members:

`Evaluator`
~~~~~~~~~~~
.. autoclass:: Evaluator
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Features
Getting started
---------------

`MedNIST demo <https://colab.research.google.com/drive/1wy8XUSnNWlhDNazFdvGBHLfdkGvOHBKe>`_ and `MONAI for PyTorch Users <https://colab.research.google.com/drive/1boqy7ENpKrqaJoxFlbHIBnIODAs1Ih1T>`_ are available on Colab.
`MedNIST demo <https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/2d_classification/mednist_tutorial.ipynb>`_ and `MONAI for PyTorch Users <https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/modules/developer_guide.ipynb>`_ are available on Colab.

Examples and notebook tutorials are located at `Project-MONAI/tutorials <https://github.com/Project-MONAI/tutorials>`_.

Expand Down
Loading

0 comments on commit 0067953

Please sign in to comment.