Skip to content
Merged
7 changes: 4 additions & 3 deletions .github/workflows/pep8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@ jobs:
pep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: cache weekly timestamp
id: pip-cache
run: |
echo "::set-output name=datew::$(date '+%Y-%V')"
- name: cache for pip
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt
python -m pip install -r requirements.txt
- name: PEP8 check
run: |
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/test-modified.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build

on:
# quick tests of modified notebooks for every pull request
push:
branches:
- main
pull_request:

concurrency:
# automatically cancel the previously triggered workflows when there's a newer version
group: build-gpu-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
if: github.repository == 'Project-MONAI/tutorials'
container:
image: nvcr.io/nvidia/pytorch:21.06-py3 # CUDA 11.3
options: "--gpus 0"
runs-on: [self-hosted, linux, x64]
steps:
- name: Install MONAI
id: monai-install
run: |
which python
python -m pip install --upgrade pip wheel
BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/main/requirements-dev.txt
- uses: actions/checkout@v3
- name: Notebook quick check
shell: bash
run: |
git fetch origin main
python -m pip install -r requirements.txt; python -m pip list
git diff --name-only origin/main | while read line; do if [[ $line == *.ipynb ]]; then ./runner.sh -p "-and -wholename './${line}'"; fi; done;
# [[ $line == *.ipynb ]] && ./runner.sh --file "$line"
2 changes: 1 addition & 1 deletion modules/2d_slices_from_3d_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Training with 2D slices from volumes\n",
"\n",
"This tutorial shows how to train a network with 2D samples from 3D inputs.\n",
"This tutorial shows how to train a network with 2D slice samples from 3D inputs.\n",
"\n",
"It mainly demonstrates 2d slice dataset using `monai.data.PatchIterd` and `monai.data.GridPatchDataset`.\n",
"\n",
Expand Down
3 changes: 2 additions & 1 deletion runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ do
failfast=true
;;
-p|--pattern)
pattern="$2"
pattern+="$2"
echo $pattern
shift
;;
-k|--kernelspec)
Expand Down