diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 74ba22ed8f..f33c3a3f41 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -15,9 +15,9 @@ 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 @@ -25,7 +25,7 @@ jobs: 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 @@ -33,6 +33,7 @@ jobs: - 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: | diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml new file mode 100644 index 0000000000..422e8e8526 --- /dev/null +++ b/.github/workflows/test-modified.yml @@ -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" diff --git a/modules/2d_slices_from_3d_training.ipynb b/modules/2d_slices_from_3d_training.ipynb index c99d58ffb4..a547dcbcf3 100644 --- a/modules/2d_slices_from_3d_training.ipynb +++ b/modules/2d_slices_from_3d_training.ipynb @@ -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", diff --git a/runner.sh b/runner.sh index 108c57330f..0c4db3be67 100755 --- a/runner.sh +++ b/runner.sh @@ -141,7 +141,8 @@ do failfast=true ;; -p|--pattern) - pattern="$2" + pattern+="$2" + echo $pattern shift ;; -k|--kernelspec)