GeezerVison is showing github.com — run modified notebooks (#117) · Project-MONAI/tutorials@a9eaf33
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/pep8.yml +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,24 +15,25 @@ jobs: |
15 | 15 | pep8: |
16 | 16 | runs-on: ubuntu-latest |
17 | 17 | steps: |
18 | | - - uses: actions/checkout@v2 |
| 18 | + - uses: actions/checkout@v3 |
19 | 19 | - name: Set up Python 3.8 |
20 | | - uses: actions/setup-python@v2 |
| 20 | + uses: actions/setup-python@v3 |
21 | 21 | with: |
22 | 22 | python-version: 3.8 |
23 | 23 | - name: cache weekly timestamp |
24 | 24 | id: pip-cache |
25 | 25 | run: | |
26 | 26 | echo "::set-output name=datew::$(date '+%Y-%V')" |
27 | 27 | - name: cache for pip |
28 | | - uses: actions/cache@v2 |
| 28 | + uses: actions/cache@v3 |
29 | 29 | id: cache |
30 | 30 | with: |
31 | 31 | path: ~/.cache/pip |
32 | 32 | key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} |
33 | 33 | - name: Install dependencies |
34 | 34 | run: | |
35 | 35 | python -m pip install --upgrade pip wheel |
| 36 | + python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt |
36 | 37 | python -m pip install -r requirements.txt |
37 | 38 | - name: PEP8 check |
38 | 39 | run: | |
|
Collapse file
Copy file name to clipboard +37Lines changed: 37 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +name: build |
| 2 | + |
| 3 | +on: |
| 4 | + # quick tests of modified notebooks for every pull request |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + pull_request: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + # automatically cancel the previously triggered workflows when there's a newer version |
| 12 | + group: build-gpu-${{ github.event.pull_request.number || github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + if: github.repository == 'Project-MONAI/tutorials' |
| 18 | + container: |
| 19 | + image: nvcr.io/nvidia/pytorch:21.06-py3 # CUDA 11.3 |
| 20 | + options: "--gpus 0" |
| 21 | + runs-on: [self-hosted, linux, x64] |
| 22 | + steps: |
| 23 | + - name: Install MONAI |
| 24 | + id: monai-install |
| 25 | + run: | |
| 26 | + which python |
| 27 | + python -m pip install --upgrade pip wheel |
| 28 | + BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI |
| 29 | + python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/main/requirements-dev.txt |
| 30 | + - uses: actions/checkout@v3 |
| 31 | + - name: Notebook quick check |
| 32 | + shell: bash |
| 33 | + run: | |
| 34 | + git fetch origin main |
| 35 | + python -m pip install -r requirements.txt; python -m pip list |
| 36 | + git diff --name-only origin/main | while read line; do if [[ $line == *.ipynb ]]; then ./runner.sh -p "-and -wholename './${line}'"; fi; done; |
| 37 | + # [[ $line == *.ipynb ]] && ./runner.sh --file "$line" |
Collapse file
Copy file name to clipboardExpand all lines: modules/2d_slices_from_3d_training.ipynb +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | "source": [ |
7 | 7 | "# Training with 2D slices from volumes\n", |
8 | 8 | "\n", |
9 | | - "This tutorial shows how to train a network with 2D samples from 3D inputs.\n", |
| 9 | + "This tutorial shows how to train a network with 2D slice samples from 3D inputs.\n", |
10 | 10 | "\n", |
11 | 11 | "It mainly demonstrates 2d slice dataset using `monai.data.PatchIterd` and `monai.data.GridPatchDataset`.\n", |
12 | 12 | "\n", |
|
Collapse file
Copy file name to clipboardExpand all lines: runner.sh +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
141 | 141 | failfast=true |
142 | 142 | ;; |
143 | 143 | -p|--pattern) |
144 | | - pattern="$2" |
| 144 | + pattern+="$2" |
| 145 | + echo $pattern |
145 | 146 | shift |
146 | 147 | ;; |
147 | 148 | -k|--kernelspec) |
|