Skip to content

Commit ae09e88

Browse files
author
Donglai Wei
committed
Merge v2.0 branch into master
- Resolved merge conflicts by keeping v2.0 changes - Removed deprecated files that were deleted in v2.0 - Updated visualizer.py to use v2.0 version - Major refactoring: moved from engine/ to lightning/, model/ to models/ - Added new features: auto-config, hydra integration, monai transforms - Updated documentation and added new tutorials - Removed legacy projects and configs
2 parents 7ec3284 + b390a00 commit ae09e88

File tree

334 files changed

+34986
-22711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+34986
-22711
lines changed

.github/two_stream_overview.png

-861 KB
Binary file not shown.

.github/workflows/build-wheels.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build Wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build_wheels:
11+
name: Build wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-20.04, macos-11, windows-2019]
16+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build wheel setuptools
30+
31+
- name: Build wheel
32+
run: python -m build --wheel
33+
34+
- name: Upload wheels
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: wheels
38+
path: dist/*.whl
39+
40+
build_sdist:
41+
name: Build source distribution
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- name: Set up Python
47+
uses: actions/setup-python@v4
48+
with:
49+
python-version: '3.10'
50+
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install build
55+
56+
- name: Build sdist
57+
run: python -m build --sdist
58+
59+
- name: Upload sdist
60+
uses: actions/upload-artifact@v3
61+
with:
62+
name: sdist
63+
path: dist/*.tar.gz
64+
65+
upload_pypi:
66+
name: Upload to PyPI
67+
needs: [build_wheels, build_sdist]
68+
runs-on: ubuntu-latest
69+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
70+
steps:
71+
- uses: actions/download-artifact@v3
72+
with:
73+
name: wheels
74+
path: dist
75+
76+
- uses: actions/download-artifact@v3
77+
with:
78+
name: sdist
79+
path: dist
80+
81+
- name: Publish to PyPI
82+
uses: pypa/gh-action-pypi-publish@release/v1
83+
with:
84+
user: __token__
85+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ main, master, v2.0 ]
6+
pull_request:
7+
branches: [ main, master, v2.0 ]
8+
9+
jobs:
10+
build-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -e .[docs]
24+
25+
- name: Build documentation
26+
run: |
27+
cd docs
28+
make html
29+
30+
- name: Deploy to GitHub Pages
31+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./docs/build/html

.github/workflows/tests.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master, v2.0 ]
6+
pull_request:
7+
branches: [ main, master, v2.0 ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
python-version: ['3.8', '3.9', '3.10', '3.11']
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pytest pytest-cov
29+
pip install -e .
30+
31+
- name: Run tests
32+
run: |
33+
pytest tests/ -v --cov=connectomics --cov-report=xml
34+
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v3
37+
with:
38+
file: ./coverage.xml
39+
flags: unittests
40+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
41+
42+
lint:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Set up Python
48+
uses: actions/setup-python@v4
49+
with:
50+
python-version: '3.10'
51+
52+
- name: Install linters
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install black flake8 isort mypy
56+
57+
- name: Run black
58+
run: black --check connectomics/
59+
60+
- name: Run flake8
61+
run: flake8 connectomics/ --max-line-length=100
62+
63+
- name: Run isort
64+
run: isort --check connectomics/
65+
66+
- name: Run mypy
67+
run: mypy connectomics/ --ignore-missing-imports

.gitignore

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,28 @@ dmypy.json
126126
.vscode/
127127
*~
128128

129-
datasets/
129+
datasets/*
130130
others/
131131
locals/
132132
outputs/
133133
tmpwdir/
134134
*.iml
135135
.idea/
136136
docs/pytorch_sphinx_theme
137+
lightning_logs/
138+
slurm_outputs/
139+
140+
# Build artifacts
141+
build/
142+
*.egg-info/
143+
144+
# Editor configs
145+
.vscode/
146+
.idea/
147+
148+
# OS files
149+
.DS_Store
150+
Thumbs.db
151+
152+
# Development logs and documentation
153+
.claude/

BENCHMARK.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ For example:
108108

109109
* [connectomics](connectomics) - The actual Pytorch Connectomics library.
110110
* [data](connectomics/data) - Dataset and dataloader for large-scale volumetric data
111-
* [model](connectomics/model) - Model zoo for 3D segmentation
111+
* [models](connectomics/models) - Model zoo for 3D segmentation
112112
* [engine](connectomics/engine) - Training and inference routines
113113
* [config](connectomics/config) - Configuration files for training and inference
114114

0 commit comments

Comments
 (0)