From a52324457e845f5e6abed4cd086255bf95b1ee63 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:19:56 +0100 Subject: [PATCH 01/12] Update Actions Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 33 ++++++++++++----------------- .github/workflows/guidelines.yml | 33 ++++++++++++----------------- .github/workflows/pep8.yml | 33 ++++++++++++----------------- .github/workflows/test-modified.yml | 15 ++++++------- 4 files changed, 49 insertions(+), 65 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 03a8a74065..f7ff96ea36 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -7,34 +7,29 @@ on: - main pull_request: +concurrency: + # automatically cancel the previously triggered workflows when there's a newer version + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) copyright: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 - with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache + - uses: actions/checkout@v7 + - uses: actions/checkout@v7 + repository: https://github.com/Project-MONAI/MONAI + path: monai + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - 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 https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + (cd monai; BUILD_MONAI=0 pip install .[all]) python -m pip install -r requirements.txt - name: Copyright check run: | diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 34540731df..1112628301 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -7,34 +7,29 @@ on: - main pull_request: +concurrency: + # automatically cancel the previously triggered workflows when there's a newer version + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) guidelines: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 - with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache + - uses: actions/checkout@v7 + - uses: actions/checkout@v7 + repository: https://github.com/Project-MONAI/MONAI + path: monai + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - 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 https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + (cd monai; BUILD_MONAI=0 pip install .[all]) python -m pip install -r requirements.txt - name: Guidelines notebook format check run: | diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 2c48786f97..9523e65c54 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -7,34 +7,29 @@ on: - main pull_request: +concurrency: + # automatically cancel the previously triggered workflows when there's a newer version + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) pep8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 - with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache + - uses: actions/checkout@v7 + - uses: actions/checkout@v7 + repository: https://github.com/Project-MONAI/MONAI + path: monai + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - 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 https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + (cd monai; BUILD_MONAI=0 pip install .[all]) python -m pip install -r requirements.txt - name: PEP8 check run: | diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index 6f2cccbb98..0c9c403aaf 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -16,9 +16,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 + - uses: actions/checkout@v7 + repository: https://github.com/Project-MONAI/MONAI + path: monai - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: '3.10' - name: Install MONAI @@ -26,17 +29,13 @@ jobs: run: | which python python -m pip install -U pip wheel - python -m pip install torch torchvision torchaudio - - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + (cd monai; BUILD_MONAI=0 pip install .[all]) python -m pip install -r requirements.txt - - BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI python -m pip list - name: Notebook quick check shell: bash run: | - python -c "import monai; monai.config.print_debug_info()" + python -m monai.config git fetch origin main git diff --name-only origin/main | while read line do From 0a18dabe9b6d2f4fad29d4e756dc52bfa1b3fdce Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:24:37 +0100 Subject: [PATCH 02/12] Fix Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 2 +- .github/workflows/guidelines.yml | 2 +- .github/workflows/pep8.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index f7ff96ea36..47f045c4db 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 1112628301..17b85e8f0f 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 9523e65c54..22c987ce88 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | From 466da03017852f1147fcd436f7eefca2d835a84c Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:31:22 +0100 Subject: [PATCH 03/12] Updates Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 10 ++++++++-- .github/workflows/guidelines.yml | 10 ++++++++-- .github/workflows/pep8.yml | 12 +++++++++--- .github/workflows/test-modified.yml | 14 ++++++++++---- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 47f045c4db..41d2cb66a3 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -7,6 +7,9 @@ on: - main pull_request: +permissions: + contents: read + concurrency: # automatically cancel the previously triggered workflows when there's a newer version group: build-${{ github.event.pull_request.number || github.ref }} @@ -18,14 +21,17 @@ jobs: steps: - uses: actions/checkout@v7 - uses: actions/checkout@v7 - repository: https://github.com/Project-MONAI/MONAI - path: monai + with: + repository: https://github.com/Project-MONAI/MONAI + path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 with: python-version: '3.10' cache: 'pip' - name: Install dependencies + env: + PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 17b85e8f0f..6d392be756 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -7,6 +7,9 @@ on: - main pull_request: +permissions: + contents: read + concurrency: # automatically cancel the previously triggered workflows when there's a newer version group: build-${{ github.event.pull_request.number || github.ref }} @@ -18,14 +21,17 @@ jobs: steps: - uses: actions/checkout@v7 - uses: actions/checkout@v7 - repository: https://github.com/Project-MONAI/MONAI - path: monai + with: + repository: https://github.com/Project-MONAI/MONAI + path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 with: python-version: '3.10' cache: 'pip' - name: Install dependencies + env: + PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 22c987ce88..ecfb7fdb5d 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -7,6 +7,9 @@ on: - main pull_request: +permissions: + contents: read + concurrency: # automatically cancel the previously triggered workflows when there's a newer version group: build-${{ github.event.pull_request.number || github.ref }} @@ -18,17 +21,20 @@ jobs: steps: - uses: actions/checkout@v7 - uses: actions/checkout@v7 - repository: https://github.com/Project-MONAI/MONAI - path: monai + with: + repository: https://github.com/Project-MONAI/MONAI + path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 with: python-version: '3.10' cache: 'pip' - name: Install dependencies + env: + PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip wheel wheel-stub (cd monai; BUILD_MONAI=0 pip install .[all]) python -m pip install -r requirements.txt - name: PEP8 check diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index bfff06e091..f955f5d1fd 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -7,6 +7,9 @@ on: - main pull_request: +permissions: + contents: read + concurrency: # automatically cancel the previously triggered workflows when there's a newer version group: build-${{ github.event.pull_request.number || github.ref }} @@ -18,8 +21,9 @@ jobs: steps: - uses: actions/checkout@v7 - uses: actions/checkout@v7 - repository: https://github.com/Project-MONAI/MONAI - path: monai + with: + repository: https://github.com/Project-MONAI/MONAI + path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 with: @@ -30,12 +34,14 @@ jobs: env: PIP_NO_CACHE_DIR: "1" PIP_DISABLE_PIP_VERSION_CHECK: "1" + BUILD_MONAI: 0 + PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; df -h which python - python -m pip install -U pip wheel - (cd monai; BUILD_MONAI=0 pip install .[all]) + python -m pip install -U pip wheel wheel-stub + (cd monai; pip install --no-build-isolation .[all]) python -m pip install -r requirements.txt python -m pip list - name: Notebook quick check From 259268267f54545b4f4a25ad65a6981a6c85a928 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:33:12 +0100 Subject: [PATCH 04/12] Fix URLs Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 2 +- .github/workflows/guidelines.yml | 2 +- .github/workflows/pep8.yml | 2 +- .github/workflows/test-modified.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 41d2cb66a3..02ad932de2 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/checkout@v7 with: - repository: https://github.com/Project-MONAI/MONAI + repository: Project-MONAI/MONAI path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 6d392be756..86b0a61ed9 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/checkout@v7 with: - repository: https://github.com/Project-MONAI/MONAI + repository: Project-MONAI/MONAI path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index ecfb7fdb5d..60c11c59ba 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/checkout@v7 with: - repository: https://github.com/Project-MONAI/MONAI + repository: Project-MONAI/MONAI path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index f955f5d1fd..abd6d5c35c 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/checkout@v7 with: - repository: https://github.com/Project-MONAI/MONAI + repository: Project-MONAI/MONAI path: monai - name: Set up Python 3.10 uses: actions/setup-python@v6 From e4c578bccb1bfba01350f5c956f24a1b5eac2baa Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:37:29 +0100 Subject: [PATCH 05/12] Updates Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 02ad932de2..c7e110df15 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -12,7 +12,7 @@ permissions: concurrency: # automatically cancel the previously triggered workflows when there's a newer version - group: build-${{ github.event.pull_request.number || github.ref }} + group: copyright-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: @@ -32,10 +32,11 @@ jobs: - name: Install dependencies env: PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster + BUILD_MONAI: 0 run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel - (cd monai; BUILD_MONAI=0 pip install .[all]) + (cd monai; pip install .[all]) python -m pip install -r requirements.txt - name: Copyright check run: | From f903a5fdf3d1d036bdabdcb08c367ab5512aaf22 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:37:48 +0100 Subject: [PATCH 06/12] Updates Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/guidelines.yml | 5 +++-- .github/workflows/pep8.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 86b0a61ed9..e165c92260 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -12,7 +12,7 @@ permissions: concurrency: # automatically cancel the previously triggered workflows when there's a newer version - group: build-${{ github.event.pull_request.number || github.ref }} + group: guidelines-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: @@ -32,10 +32,11 @@ jobs: - name: Install dependencies env: PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster + BUILD_MONAI: 0 run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel - (cd monai; BUILD_MONAI=0 pip install .[all]) + (cd monai; pip install .[all]) python -m pip install -r requirements.txt - name: Guidelines notebook format check run: | diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 60c11c59ba..d1daf91c1f 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -12,7 +12,7 @@ permissions: concurrency: # automatically cancel the previously triggered workflows when there's a newer version - group: build-${{ github.event.pull_request.number || github.ref }} + group: pep8-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: @@ -32,10 +32,11 @@ jobs: - name: Install dependencies env: PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu" # forces CPU PyTorch installation, should be faster + BUILD_MONAI: 0 run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel wheel-stub - (cd monai; BUILD_MONAI=0 pip install .[all]) + (cd monai; pip install .[all]) python -m pip install -r requirements.txt - name: PEP8 check run: | From 60bf2f00975c929a8ece0e3397f3733f5d6803a8 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:41:55 +0100 Subject: [PATCH 07/12] No isolation Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/test-modified.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index abd6d5c35c..2365d17302 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -40,8 +40,8 @@ jobs: find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; df -h which python - python -m pip install -U pip wheel wheel-stub - (cd monai; pip install --no-build-isolation .[all]) + python -m pip install -U pip wheel + (cd monai; pip install .[all]) python -m pip install -r requirements.txt python -m pip list - name: Notebook quick check From c67db1238d576767a4f2a43dc99d0e7782cc0fc6 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:49:44 +0100 Subject: [PATCH 08/12] Copyright fix Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index c7e110df15..9625beb31f 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -40,4 +40,5 @@ jobs: python -m pip install -r requirements.txt - name: Copyright check run: | + rm -rf monai $(pwd)/runner.sh --no-run --no-checks --copyright From 7e06e46dc07ff3ea5eaf58690b246ac2ce89c1e4 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:58:26 +0100 Subject: [PATCH 09/12] Test modifying a notebook Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- 2d_classification/monai_101.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2d_classification/monai_101.ipynb b/2d_classification/monai_101.ipynb index 5f3c3d0829..fcd038cc5c 100644 --- a/2d_classification/monai_101.ipynb +++ b/2d_classification/monai_101.ipynb @@ -114,7 +114,7 @@ "\n", "from monai.apps import MedNISTDataset\n", "from monai.config import print_config\n", - "from monai.data import DataLoader\n", + "from monai.data import DataLoader,Dataset\n", "from monai.engines import SupervisedTrainer\n", "from monai.handlers import StatsHandler\n", "from monai.inferers import SimpleInferer\n", From 9888f93174175a64f6c0bff7afab277822ec05c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 16:59:20 +0000 Subject: [PATCH 10/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- 2d_classification/monai_101.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2d_classification/monai_101.ipynb b/2d_classification/monai_101.ipynb index fcd038cc5c..2f7ceabd7b 100644 --- a/2d_classification/monai_101.ipynb +++ b/2d_classification/monai_101.ipynb @@ -114,7 +114,7 @@ "\n", "from monai.apps import MedNISTDataset\n", "from monai.config import print_config\n", - "from monai.data import DataLoader,Dataset\n", + "from monai.data import DataLoader, Dataset\n", "from monai.engines import SupervisedTrainer\n", "from monai.handlers import StatsHandler\n", "from monai.inferers import SimpleInferer\n", From 3fea87acbe596b6384c6b720fc94728818cc7c31 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 18:06:55 +0100 Subject: [PATCH 11/12] Different Change Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- 2d_classification/monai_101.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2d_classification/monai_101.ipynb b/2d_classification/monai_101.ipynb index 2f7ceabd7b..1d377de205 100644 --- a/2d_classification/monai_101.ipynb +++ b/2d_classification/monai_101.ipynb @@ -114,7 +114,7 @@ "\n", "from monai.apps import MedNISTDataset\n", "from monai.config import print_config\n", - "from monai.data import DataLoader, Dataset\n", + "from monai.data import DataLoader\n", "from monai.engines import SupervisedTrainer\n", "from monai.handlers import StatsHandler\n", "from monai.inferers import SimpleInferer\n", @@ -241,7 +241,7 @@ "metadata": {}, "outputs": [], "source": [ - "max_epochs = 5\n", + "max_epochs = 4\n", "device = torch.device(\"cuda:0\" if torch.cuda.device_count() > 0 else \"cpu\")\n", "model = densenet121(spatial_dims=2, in_channels=1, out_channels=6).to(device)\n", "\n", From 862efe15d0e1d20fce6154df6ec27fbbf002311f Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Mon, 14 Sep 2026 19:50:45 +0100 Subject: [PATCH 12/12] Undoing the change Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- 2d_classification/monai_101.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2d_classification/monai_101.ipynb b/2d_classification/monai_101.ipynb index 1d377de205..5f3c3d0829 100644 --- a/2d_classification/monai_101.ipynb +++ b/2d_classification/monai_101.ipynb @@ -241,7 +241,7 @@ "metadata": {}, "outputs": [], "source": [ - "max_epochs = 4\n", + "max_epochs = 5\n", "device = torch.device(\"cuda:0\" if torch.cuda.device_count() > 0 else \"cpu\")\n", "model = densenet121(spatial_dims=2, in_channels=1, out_channels=6).to(device)\n", "\n",