Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
khatchad committed Jul 26, 2024
2 parents d4fecf6 + 976691d commit 231ec54
Show file tree
Hide file tree
Showing 70 changed files with 2,437 additions and 6,106 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git/
docker/
.idea/
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.10", "3.9", "3.8", "3.7"]
python-version: ["3.11", "3.10", "3.9"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with: # no need for the history
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -29,3 +29,19 @@ jobs:
- name: Test with pytest
run: |
pytest
image-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.11", "3.10", "3.9"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Test CPU Docker image build
run: |
docker build -t neuronets/nobrainer:master-cpu -f docker/cpu.Dockerfile .
- name: Test GPU Docker image build
run: |
docker build -t neuronets/nobrainer:master-gpu -f docker/gpu.Dockerfile .
89 changes: 89 additions & 0 deletions .github/workflows/guide-notebooks-ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Guide Notebooks Regression - EC2
run-name: ${{ github.ref_name }} - Guide Notebooks Regression - EC2
on: [push]
jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_KEY_SECRET }}
aws-region: ${{ vars.AWS_REGION }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_TOKEN }}
ec2-image-id: ${{ vars.AWS_IMAGE_ID }}
ec2-instance-type: ${{ vars.AWS_INSTANCE_TYPE }}
subnet-id: ${{ vars.AWS_SUBNET }}
security-group-id: ${{ vars.AWS_SECURITY_GROUP }}

guide_notebooks_regression_ec2:
needs: start-runner # required to start the main job when the runner is ready
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
steps:
- name: clone
uses: actions/checkout@v3
- name: install
run: |
set -xe
cd ${{ github.workspace }}
source /opt/tensorflow/bin/activate
export LD_LIBRARY_PATH=opt/amazon/efa/lib:/opt/amazon/openmpi/lib:/usr/local/cuda/efa/lib:/usr/local/cuda/lib:/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/targets/x86_64-linux/lib:/usr/local/lib:/usr/lib
echo $LD_LIBRARY_PATH
pip install matplotlib nilearn
pip install -U tensorflow
pip install -e .
nobrainer info
- name: run
run: |
set -xe
cd ${{ github.workspace }}
git clone https://github.com/neuronets/nobrainer-book.git
cd nobrainer-book
# if there is a matching book branch, switch to it
if [ $(git ls-remote --heads https://github.com/neuronets/nobrainer-book.git ${{ github.ref_name }} | wc -l) -ne 0 ]; then
echo "Checking out branch ${{ github.ref_name }}"
git checkout ${{ github.ref_name }};
else
echo "No matching branch found, sticking with the default"
fi
cd ${{ github.workspace }}
export LD_LIBRARY_PATH=opt/amazon/efa/lib:/opt/amazon/openmpi/lib:/usr/local/cuda/efa/lib:/usr/local/cuda/lib:/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/targets/x86_64-linux/lib:/usr/local/lib:/usr/lib
source /opt/tensorflow/bin/activate
for notebook_script in $(ls nobrainer-book/docs/nobrainer-guides/scripts/*.py); do
echo "running ${notebook_script}"
python ${notebook_script}
done
stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner # required to get output from the start-runner job
- guide_notebooks_regression_ec2 # required to wait when the main job is done
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_KEY_SECRET }}
aws-region: ${{ vars.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
pypi-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.9

- name: Install build & twine
run: python -m pip install build twine
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ on:
- master

env:
# Pin to v10.28.0, which (as of 2021-05-25) is the latest version with assets
AUTO_VERSION: v10.29.3
AUTO_VERSION: v11.0.5

jobs:
auto-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Prepare repository
# Fetch full git history and tags
Expand All @@ -27,9 +26,9 @@ jobs:
run: git config --local --unset http.https://github.com/.extraheader

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.9

- name: Download auto
run: |
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
exclude: ^(nobrainer/_version\.py|versioneer\.py)$
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.6
hooks:
- id: codespell
exclude: ^(nobrainer/_version\.py|versioneer\.py)$
exclude: ^(nobrainer/_version\.py|versioneer\.py|pyproject\.toml|CHANGELOG\.md)$
177 changes: 177 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,180 @@
# 1.2.1 (Thu Apr 04 2024)

#### 🐛 Bug Fix

- Fix PGAN notebook [#319](https://github.com/neuronets/nobrainer/pull/319) ([@satra](https://github.com/satra) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- fix dependencies [#318](https://github.com/neuronets/nobrainer/pull/318) ([@satra](https://github.com/satra))
- Update setup.cfg to add cuda option [#309](https://github.com/neuronets/nobrainer/pull/309) ([@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#294](https://github.com/neuronets/nobrainer/pull/294) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra) [@hvgazula](https://github.com/hvgazula))

#### Authors: 3

- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- H Gazula ([@hvgazula](https://github.com/hvgazula))
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 1.2.0 (Fri Mar 22 2024)

#### 🚀 Enhancement

- Dev [#295](https://github.com/neuronets/nobrainer/pull/295) ([@hvgazula](https://github.com/hvgazula) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Update setup.cfg [#299](https://github.com/neuronets/nobrainer/pull/299) ([@satra](https://github.com/satra))

#### 🐛 Bug Fix

- Update release.yml ([@satra](https://github.com/satra))
- change hyphenation [#275](https://github.com/neuronets/nobrainer/pull/275) ([@satra](https://github.com/satra))
- update precommit checks [#275](https://github.com/neuronets/nobrainer/pull/275) ([@satra](https://github.com/satra))
- fix docker syntax [#275](https://github.com/neuronets/nobrainer/pull/275) ([@satra](https://github.com/satra))
- remove trained models [#275](https://github.com/neuronets/nobrainer/pull/275) ([@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#269](https://github.com/neuronets/nobrainer/pull/269) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### Authors: 3

- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- H Gazula ([@hvgazula](https://github.com/hvgazula))
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 1.1.1 (Sat Oct 07 2023)

#### 🐛 Bug Fix

- Small changes to support long, preemptable training runs [#267](https://github.com/neuronets/nobrainer/pull/267) ([@ohinds](https://github.com/ohinds) [@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#268](https://github.com/neuronets/nobrainer/pull/268) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### Authors: 3

- [@ohinds](https://github.com/ohinds)
- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 1.1.0 (Tue Sep 19 2023)

#### 🚀 Enhancement

- Changes required to support the warmstart guide notebook [#266](https://github.com/neuronets/nobrainer/pull/266) ([@ohinds](https://github.com/ohinds) [@satra](https://github.com/satra) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### 🐛 Bug Fix

- Fix some typos using codespell [#262](https://github.com/neuronets/nobrainer/pull/262) ([@yarikoptic](https://github.com/yarikoptic) [@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#263](https://github.com/neuronets/nobrainer/pull/263) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Remove unnecessary keepalive runner [#265](https://github.com/neuronets/nobrainer/pull/265) ([@ohinds](https://github.com/ohinds))
- Dynamically provision self-hosted runner [#264](https://github.com/neuronets/nobrainer/pull/264) ([@ohinds](https://github.com/ohinds))

#### Authors: 4

- [@ohinds](https://github.com/ohinds)
- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- Satrajit Ghosh ([@satra](https://github.com/satra))
- Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))

---

# 1.0.0 (Thu Aug 31 2023)

#### 💥 Breaking Change

- `nobrainer` dataset API rework [#261](https://github.com/neuronets/nobrainer/pull/261) ([@ohinds](https://github.com/ohinds) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))

#### 🐛 Bug Fix

- Fix Dockerfiles and add GitHub Actions job [#252](https://github.com/neuronets/nobrainer/pull/252) ([@kabilar](https://github.com/kabilar) [@satra](https://github.com/satra))
- Self-hosted runner weekly keepalive [#260](https://github.com/neuronets/nobrainer/pull/260) ([@ohinds](https://github.com/ohinds))
- [pre-commit.ci] pre-commit autoupdate [#253](https://github.com/neuronets/nobrainer/pull/253) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Processing model checkpointing [#256](https://github.com/neuronets/nobrainer/pull/256) ([@ohinds](https://github.com/ohinds) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Verify that the ec2 instance we started is where we are running. [#257](https://github.com/neuronets/nobrainer/pull/257) ([@ohinds](https://github.com/ohinds))
- Training from warm start with multiple GPUs [#251](https://github.com/neuronets/nobrainer/pull/251) ([@ohinds](https://github.com/ohinds) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### Authors: 4

- [@ohinds](https://github.com/ohinds)
- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- Kabilar Gunalan ([@kabilar](https://github.com/kabilar))
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 0.5.0 (Wed Jul 19 2023)

#### 🚀 Enhancement

- Remove guide [#243](https://github.com/neuronets/nobrainer/pull/243) ([@ohinds](https://github.com/ohinds) [@satra](https://github.com/satra))

#### 🐛 Bug Fix

- [pre-commit.ci] pre-commit autoupdate [#247](https://github.com/neuronets/nobrainer/pull/247) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Fix #246: Transforms now return labels if passed [#250](https://github.com/neuronets/nobrainer/pull/250) ([@ohinds](https://github.com/ohinds) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- Check out the master branch of the book repo on CI [#249](https://github.com/neuronets/nobrainer/pull/249) ([@ohinds](https://github.com/ohinds))
- Nobrainer book guide examples run on AWS EC2 as a form of regression testing [#248](https://github.com/neuronets/nobrainer/pull/248) ([@ohinds](https://github.com/ohinds))
- [pre-commit.ci] pre-commit autoupdate [#236](https://github.com/neuronets/nobrainer/pull/236) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Multi-GPU support [#242](https://github.com/neuronets/nobrainer/pull/242) ([@ohinds](https://github.com/ohinds) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#234](https://github.com/neuronets/nobrainer/pull/234) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#232](https://github.com/neuronets/nobrainer/pull/232) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#231](https://github.com/neuronets/nobrainer/pull/231) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### ⚠️ Pushed to `master`

- Update setup.cfg ([@satra](https://github.com/satra))
- Update ci.yml ([@satra](https://github.com/satra))
- update python and tensorflow versions ([@satra](https://github.com/satra))
- [CI] update python and auto versions ([@satra](https://github.com/satra))
- replace special branch ([@satra](https://github.com/satra))

#### Authors: 3

- [@ohinds](https://github.com/ohinds)
- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 0.4.0 (Tue Oct 18 2022)

#### 🚀 Enhancement

- update actions [#230](https://github.com/neuronets/nobrainer/pull/230) ([@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#229](https://github.com/neuronets/nobrainer/pull/229) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))

#### 🐛 Bug Fix

- Enh/api [#228](https://github.com/neuronets/nobrainer/pull/228) ([@satra](https://github.com/satra) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#227](https://github.com/neuronets/nobrainer/pull/227) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- Create unet_lstm.py [#207](https://github.com/neuronets/nobrainer/pull/207) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra) [@Hoda1394](https://github.com/Hoda1394))
- [pre-commit.ci] pre-commit autoupdate [#226](https://github.com/neuronets/nobrainer/pull/226) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#225](https://github.com/neuronets/nobrainer/pull/225) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#224](https://github.com/neuronets/nobrainer/pull/224) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#223](https://github.com/neuronets/nobrainer/pull/223) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [WIP] Updating and simplifying the end-user API of Nobrainer [#215](https://github.com/neuronets/nobrainer/pull/215) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@Hoda1394](https://github.com/Hoda1394) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#220](https://github.com/neuronets/nobrainer/pull/220) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [pre-commit.ci] pre-commit autoupdate [#218](https://github.com/neuronets/nobrainer/pull/218) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- Hard-Coded Scaling is removed for ProgressiveGANs, GanTrainer and ProgressiveAE Training and Model files [#209](https://github.com/neuronets/nobrainer/pull/209) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- generation api [#216](https://github.com/neuronets/nobrainer/pull/216) ([@Hoda1394](https://github.com/Hoda1394) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- [WIP] segmentation api [#213](https://github.com/neuronets/nobrainer/pull/213) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@Hoda1394](https://github.com/Hoda1394) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
- file name corrected for bayesian_meshnet.py [#211](https://github.com/neuronets/nobrainer/pull/211) ([@Hoda1394](https://github.com/Hoda1394) [@satra](https://github.com/satra))
- [pre-commit.ci] pre-commit autoupdate [#212](https://github.com/neuronets/nobrainer/pull/212) ([@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))
- Adding vox2vox model [#205](https://github.com/neuronets/nobrainer/pull/205) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@Hoda1394](https://github.com/Hoda1394))
- added tensorflow-addons as install dependency [#206](https://github.com/neuronets/nobrainer/pull/206) ([@Hoda1394](https://github.com/Hoda1394))
- Composable Data Augmentations [#189](https://github.com/neuronets/nobrainer/pull/189) ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]) [@satra](https://github.com/satra))

#### ⚠️ Pushed to `master`

- update dockerfiles ([@satra](https://github.com/satra))

#### Authors: 4

- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
- Aakanksha Rana ([@Aakanksha-Rana](https://github.com/Aakanksha-Rana))
- Hoda Rajaei ([@Hoda1394](https://github.com/Hoda1394))
- Satrajit Ghosh ([@satra](https://github.com/satra))

---

# 0.3.0 (Tue Jan 11 2022)

#### 🚀 Enhancement
Expand Down
Loading

0 comments on commit 231ec54

Please sign in to comment.