octopi 1.1__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of octopi might be problematic. Click here for more details.
- octopi-1.2.0/.github/workflows/deploy-docs.yaml +72 -0
- octopi-1.2.0/.github/workflows/publish-docker.yml +98 -0
- octopi-1.2.0/.github/workflows/release-please.yml +79 -0
- octopi-1.2.0/.gitignore +168 -0
- octopi-1.2.0/.pre-commit-config.yaml +20 -0
- octopi-1.2.0/.release-please-manifest.json +3 -0
- octopi-1.2.0/CHANGELOG.md +27 -0
- octopi-1.2.0/Dockerfile +19 -0
- {octopi-1.1 → octopi-1.2.0}/LICENSE +3 -3
- {octopi-1.1 → octopi-1.2.0}/PKG-INFO +41 -29
- {octopi-1.1 → octopi-1.2.0}/README.md +11 -14
- octopi-1.2.0/SECURITY.md +2 -0
- octopi-1.2.0/docs/api/adding-new-models.md +224 -0
- octopi-1.2.0/docs/api/index.md +44 -0
- octopi-1.2.0/docs/api/inference.md +173 -0
- octopi-1.2.0/docs/api/introduction.md +14 -0
- octopi-1.2.0/docs/api/quick-start.md +255 -0
- octopi-1.2.0/docs/api/training.md +281 -0
- octopi-1.2.0/docs/assets/bo_workflow.png +0 -0
- octopi-1.2.0/docs/assets/coordinates.png +0 -0
- octopi-1.2.0/docs/assets/dashboard.png +0 -0
- octopi-1.2.0/docs/assets/logo.png +0 -0
- octopi-1.2.0/docs/assets/octopi.png +0 -0
- octopi-1.2.0/docs/assets/targets.png +0 -0
- octopi-1.2.0/docs/getting-started/data-import.md +119 -0
- octopi-1.2.0/docs/getting-started/installation.md +44 -0
- octopi-1.2.0/docs/getting-started/quickstart.md +145 -0
- octopi-1.2.0/docs/index.md +32 -0
- octopi-1.2.0/docs/user-guide/advanced-training.md +63 -0
- octopi-1.2.0/docs/user-guide/inference.md +107 -0
- octopi-1.2.0/docs/user-guide/labels.md +107 -0
- octopi-1.2.0/docs/user-guide/overview.md +59 -0
- octopi-1.2.0/docs/user-guide/pick-particles.md +1 -0
- octopi-1.2.0/docs/user-guide/training-basics.md +122 -0
- octopi-1.2.0/mkdocs.yml +89 -0
- octopi-1.2.0/notebooks/10440_config.json +83 -0
- octopi-1.2.0/octopi/__init__.py +1 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/cached_datset.py +1 -1
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/generators.py +1 -1
- octopi-1.2.0/octopi/datasets/io.py +200 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/multi_config_generator.py +1 -1
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/common.py +5 -5
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/create_slurm_submission.py +1 -1
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_create_targets.py +6 -6
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_evaluate.py +4 -3
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_extract_mb_picks.py +5 -5
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_localize.py +8 -9
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_optuna.py +7 -7
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_segment_predict.py +4 -4
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_train.py +7 -8
- {octopi-1.1 → octopi-1.2.0}/octopi/extract/localize.py +11 -19
- {octopi-1.1 → octopi-1.2.0}/octopi/extract/membranebound_extract.py +11 -10
- {octopi-1.1 → octopi-1.2.0}/octopi/extract/midpoint_extract.py +3 -3
- {octopi-1.1 → octopi-1.2.0}/octopi/models/common.py +1 -1
- {octopi-1.1/octopi/models → octopi-1.2.0/octopi/processing}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/processing/create_targets_from_picks.py +3 -4
- {octopi-1.1 → octopi-1.2.0}/octopi/processing/evaluate.py +24 -11
- {octopi-1.1 → octopi-1.2.0}/octopi/processing/importers.py +4 -4
- {octopi-1.1/octopi/processing → octopi-1.2.0/octopi/pytorch}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/pytorch/hyper_search.py +2 -3
- {octopi-1.1 → octopi-1.2.0}/octopi/pytorch/model_search_submitter.py +4 -4
- octopi-1.2.0/octopi/pytorch/segmentation.py +272 -0
- octopi-1.2.0/octopi/pytorch/segmentation_multigpu.py +162 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/pytorch/trainer.py +2 -2
- {octopi-1.1/octopi/pytorch_lightning → octopi-1.2.0/octopi/utils}/__init__.py +0 -0
- octopi-1.2.0/octopi/utils/config.py +57 -0
- octopi-1.2.0/octopi/utils/io.py +128 -0
- octopi-1.1/octopi/utils.py → octopi-1.2.0/octopi/utils/parsers.py +10 -84
- {octopi-1.1/octopi → octopi-1.2.0/octopi/utils}/stopping_criteria.py +3 -3
- {octopi-1.1/octopi → octopi-1.2.0/octopi/utils}/visualization_tools.py +4 -4
- octopi-1.2.0/octopi/workflows.py +236 -0
- octopi-1.2.0/pyproject.toml +86 -0
- octopi-1.2.0/release-please-config.json +29 -0
- octopi-1.1/octopi/io.py +0 -457
- octopi-1.1/octopi/processing/my_metrics.py +0 -26
- octopi-1.1/octopi/processing/writers.py +0 -102
- octopi-1.1/octopi/pytorch/segmentation.py +0 -321
- octopi-1.1/pyproject.toml +0 -48
- {octopi-1.1/octopi → octopi-1.2.0/octopi/datasets}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/augment.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/dataset.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/datasets/mixup.py +0 -0
- {octopi-1.1/octopi/datasets → octopi-1.2.0/octopi/entry_points}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/entry_points/run_extract_midpoint.py +0 -0
- {octopi-1.1/octopi/entry_points → octopi-1.2.0/octopi/extract}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/main.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/AttentionUnet.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/MedNeXt.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/ModelTemplate.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/SegResNet.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/Unet.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/models/UnetPlusPlus.py +0 -0
- {octopi-1.1/octopi/extract → octopi-1.2.0/octopi/models}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/processing/downsample.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/processing/segmentation_from_picks.py +0 -0
- {octopi-1.1/octopi/pytorch → octopi-1.2.0/octopi/pytorch_lightning}/__init__.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/pytorch_lightning/optuna_pl_ddp.py +0 -0
- {octopi-1.1 → octopi-1.2.0}/octopi/pytorch_lightning/train_pl.py +0 -0
- {octopi-1.1/octopi → octopi-1.2.0/octopi/utils}/losses.py +0 -0
- {octopi-1.1/octopi → octopi-1.2.0/octopi/utils}/submit_slurm.py +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- docs
|
|
8
|
+
paths:
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- 'mkdocs.yml'
|
|
11
|
+
- '.github/workflows/deploy-docs.yaml'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
- docs
|
|
16
|
+
paths:
|
|
17
|
+
- 'docs/**'
|
|
18
|
+
- 'mkdocs.yml'
|
|
19
|
+
- '.github/workflows/deploy-docs.yaml'
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
pages: write
|
|
24
|
+
id-token: write
|
|
25
|
+
|
|
26
|
+
concurrency:
|
|
27
|
+
group: "pages"
|
|
28
|
+
cancel-in-progress: false
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
build:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
|
|
37
|
+
- name: Setup Python
|
|
38
|
+
uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.8'
|
|
41
|
+
cache: 'pip'
|
|
42
|
+
|
|
43
|
+
- name: Install dependencies
|
|
44
|
+
run: |
|
|
45
|
+
python -m pip install --upgrade pip
|
|
46
|
+
pip install mkdocs-material
|
|
47
|
+
pip install mkdocs-git-revision-date-localized-plugin
|
|
48
|
+
pip install mkdocs-git-committers-plugin-2
|
|
49
|
+
pip install mkdocs-git-authors-plugin
|
|
50
|
+
pip install mkdocs-awesome-pages-plugin
|
|
51
|
+
pip install mkdocs-minify-plugin
|
|
52
|
+
pip install mkdocs-redirects
|
|
53
|
+
|
|
54
|
+
- name: Build documentation
|
|
55
|
+
run: mkdocs build
|
|
56
|
+
|
|
57
|
+
- name: Upload artifact
|
|
58
|
+
uses: actions/upload-pages-artifact@v3
|
|
59
|
+
with:
|
|
60
|
+
path: ./site
|
|
61
|
+
|
|
62
|
+
deploy:
|
|
63
|
+
needs: build
|
|
64
|
+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs'
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
environment:
|
|
67
|
+
name: github-pages
|
|
68
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
69
|
+
steps:
|
|
70
|
+
- name: Deploy to GitHub Pages
|
|
71
|
+
id: deployment
|
|
72
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: Docker
|
|
2
|
+
|
|
3
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
4
|
+
# They are provided by a third-party and are governed by
|
|
5
|
+
# separate terms of service, privacy policy, and support
|
|
6
|
+
# documentation.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
# Publish semver tags as releases.
|
|
12
|
+
tags: [ 'v*.*.*' ]
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
# Use docker.io for Docker Hub if empty
|
|
16
|
+
REGISTRY: ghcr.io
|
|
17
|
+
# github.repository as <account>/<repo>
|
|
18
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
packages: write
|
|
27
|
+
# This is used to complete the identity challenge
|
|
28
|
+
# with sigstore/fulcio when running outside of PRs.
|
|
29
|
+
id-token: write
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout repository
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
# Install the cosign tool except on PR
|
|
36
|
+
# https://github.com/sigstore/cosign-installer
|
|
37
|
+
- name: Install cosign
|
|
38
|
+
if: github.event_name != 'pull_request'
|
|
39
|
+
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
|
|
40
|
+
with:
|
|
41
|
+
cosign-release: 'v2.2.4'
|
|
42
|
+
|
|
43
|
+
# Set up BuildKit Docker container builder to be able to build
|
|
44
|
+
# multi-platform images and export cache
|
|
45
|
+
# https://github.com/docker/setup-buildx-action
|
|
46
|
+
- name: Set up Docker Buildx
|
|
47
|
+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
|
48
|
+
|
|
49
|
+
- name: Clean up unused Docker resources
|
|
50
|
+
run: docker system prune --all --force --volumes
|
|
51
|
+
|
|
52
|
+
# Login against a Docker registry except on PR
|
|
53
|
+
# https://github.com/docker/login-action
|
|
54
|
+
- name: Log into registry ${{ env.REGISTRY }}
|
|
55
|
+
if: github.event_name != 'pull_request'
|
|
56
|
+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
|
57
|
+
with:
|
|
58
|
+
registry: ${{ env.REGISTRY }}
|
|
59
|
+
username: ${{ github.actor }}
|
|
60
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
|
|
62
|
+
# Extract metadata (tags, labels) for Docker
|
|
63
|
+
# https://github.com/docker/metadata-action
|
|
64
|
+
- name: Extract Docker metadata
|
|
65
|
+
id: meta
|
|
66
|
+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
|
|
67
|
+
with:
|
|
68
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
69
|
+
tags: type=sha
|
|
70
|
+
|
|
71
|
+
# Build and push Docker image with Buildx (don't push on PR)
|
|
72
|
+
# https://github.com/docker/build-push-action
|
|
73
|
+
- name: Build and push Docker image
|
|
74
|
+
id: build-and-push
|
|
75
|
+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
|
76
|
+
with:
|
|
77
|
+
context: .
|
|
78
|
+
file: ./Dockerfile
|
|
79
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
80
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
81
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
82
|
+
cache-from: type=gha
|
|
83
|
+
cache-to: type=gha,mode=max
|
|
84
|
+
|
|
85
|
+
# Sign the resulting Docker image digest except on PRs.
|
|
86
|
+
# This will only write to the public Rekor transparency log when the Docker
|
|
87
|
+
# repository is public to avoid leaking data. If you would like to publish
|
|
88
|
+
# transparency data even for private images, pass --force to cosign below.
|
|
89
|
+
# https://github.com/sigstore/cosign
|
|
90
|
+
- name: Sign the published Docker image
|
|
91
|
+
if: ${{ github.event_name != 'pull_request' }}
|
|
92
|
+
env:
|
|
93
|
+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
|
|
94
|
+
TAGS: ${{ steps.meta.outputs.tags }}
|
|
95
|
+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
|
|
96
|
+
# This step uses the identity token to provision an ephemeral certificate
|
|
97
|
+
# against the sigstore community Fulcio instance.
|
|
98
|
+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
# cancel in-progress runs that use the same workflow and branch
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release-please:
|
|
17
|
+
name: Create Release PRs
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
# Only run release-please on pushes to main, not on PRs
|
|
20
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
issues: write
|
|
24
|
+
pull-requests: write
|
|
25
|
+
steps:
|
|
26
|
+
# Generate token using your organization's GitHub App
|
|
27
|
+
- name: Generate token
|
|
28
|
+
id: generate_token
|
|
29
|
+
uses: actions/create-github-app-token@v1
|
|
30
|
+
with:
|
|
31
|
+
app-id: ${{ secrets.GH_ACTIONS_HELPER_APP_ID }}
|
|
32
|
+
private-key: ${{ secrets.GH_ACTIONS_HELPER_PK }}
|
|
33
|
+
|
|
34
|
+
- name: Release Please
|
|
35
|
+
uses: googleapis/release-please-action@v4
|
|
36
|
+
id: release
|
|
37
|
+
with:
|
|
38
|
+
manifest-file: ".release-please-manifest.json"
|
|
39
|
+
config-file: "release-please-config.json"
|
|
40
|
+
target-branch: "main"
|
|
41
|
+
token: ${{ steps.generate_token.outputs.token }} # ← Changed from secrets.GITHUB_TOKEN
|
|
42
|
+
outputs:
|
|
43
|
+
paths_released: ${{ steps.release.outputs.paths_released }}
|
|
44
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
45
|
+
|
|
46
|
+
publish-pypi:
|
|
47
|
+
name: Build and publish to PyPI
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
needs: release-please
|
|
50
|
+
# Only publish when a release is actually created
|
|
51
|
+
if: needs.release-please.outputs.release_created == 'true'
|
|
52
|
+
environment:
|
|
53
|
+
name: pypi
|
|
54
|
+
url: https://pypi.org/p/octopi # ← Make sure this matches your PyPI package name
|
|
55
|
+
permissions:
|
|
56
|
+
id-token: write # Required for trusted publishing
|
|
57
|
+
steps:
|
|
58
|
+
- name: Checkout
|
|
59
|
+
uses: actions/checkout@v4
|
|
60
|
+
with:
|
|
61
|
+
fetch-depth: 0
|
|
62
|
+
|
|
63
|
+
- name: Set up Python
|
|
64
|
+
uses: actions/setup-python@v5
|
|
65
|
+
with:
|
|
66
|
+
python-version: "3.12"
|
|
67
|
+
|
|
68
|
+
- name: Install build dependencies
|
|
69
|
+
run: |
|
|
70
|
+
python -m pip install -U pip
|
|
71
|
+
python -m pip install build
|
|
72
|
+
|
|
73
|
+
- name: Build package
|
|
74
|
+
run: python -m build
|
|
75
|
+
|
|
76
|
+
- name: Publish to PyPI
|
|
77
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
78
|
+
with:
|
|
79
|
+
packages-dir: dist
|
octopi-1.2.0/.gitignore
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Mac stuff
|
|
59
|
+
.DS_Store
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# Ignore all the example notebooks
|
|
89
|
+
notebooks/*.ipynb
|
|
90
|
+
|
|
91
|
+
# pyenv
|
|
92
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
93
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
94
|
+
# .python-version
|
|
95
|
+
|
|
96
|
+
# pipenv
|
|
97
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
98
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
99
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
100
|
+
# install all needed dependencies.
|
|
101
|
+
#Pipfile.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
3
|
+
rev: 23.9.1
|
|
4
|
+
hooks:
|
|
5
|
+
- id: black
|
|
6
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
7
|
+
rev: v0.0.292
|
|
8
|
+
hooks:
|
|
9
|
+
- id: ruff
|
|
10
|
+
args:
|
|
11
|
+
- --fix
|
|
12
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
13
|
+
rev: v4.5.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: check-yaml
|
|
17
|
+
- id: check-json
|
|
18
|
+
- id: check-merge-conflict
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
- id: trailing-whitespace
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.2.0](https://github.com/chanzuckerberg/octopi/compare/octopi-v1.1.0...octopi-v1.2.0) (2025-08-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ✨ Features
|
|
7
|
+
|
|
8
|
+
* add release-please configuration for automated releases ([#13](https://github.com/chanzuckerberg/octopi/issues/13)) ([afc2a49](https://github.com/chanzuckerberg/octopi/commit/afc2a49e972c6f2225d01b58712d9bb1da6673db))
|
|
9
|
+
* model soup ([#20](https://github.com/chanzuckerberg/octopi/issues/20)) ([81e45c7](https://github.com/chanzuckerberg/octopi/commit/81e45c7b2a3422132d936ad04ba971d8e16eef90))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### 🐞 Bug Fixes
|
|
13
|
+
|
|
14
|
+
* Add docs extra for docs dependencies. ([#16](https://github.com/chanzuckerberg/octopi/issues/16)) ([14a5b65](https://github.com/chanzuckerberg/octopi/commit/14a5b655050529d5094d3eb2ebd48856ebfe2c34))
|
|
15
|
+
* dynamic versioning ([#21](https://github.com/chanzuckerberg/octopi/issues/21)) ([def60ab](https://github.com/chanzuckerberg/octopi/commit/def60ab403b9c8a7b8bd5a51b8f9c079a85b38e1))
|
|
16
|
+
* improvements in cli experience and localize command ([52ee7ac](https://github.com/chanzuckerberg/octopi/commit/52ee7ac2f001ffbb096fac320ab9610ca1673855))
|
|
17
|
+
* setup automated releases with organization secrets ([#15](https://github.com/chanzuckerberg/octopi/issues/15)) ([a3b04cf](https://github.com/chanzuckerberg/octopi/commit/a3b04cfca8d161953b310b2a18a61995628734ec))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🧹 Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* CCIE-4984 conform to open sourcing guidelines ([#19](https://github.com/chanzuckerberg/octopi/issues/19)) ([bd59cde](https://github.com/chanzuckerberg/octopi/commit/bd59cdeee4e85d6bc29e7d4151885e9a9344e508))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ♻️ Code Refactoring
|
|
26
|
+
|
|
27
|
+
* Modularize utilities for parsing, I/O, and configuration ([#17](https://github.com/chanzuckerberg/octopi/issues/17)) ([ff54f15](https://github.com/chanzuckerberg/octopi/commit/ff54f1559077a1ef5655fb2d34c7eaf328be2caf))
|
octopi-1.2.0/Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
|
|
2
|
+
|
|
3
|
+
# Setting working directory
|
|
4
|
+
WORKDIR /usr/app
|
|
5
|
+
|
|
6
|
+
# Base utilities
|
|
7
|
+
RUN apt update && \
|
|
8
|
+
apt install -y python3.10-venv python3-pip git &&\
|
|
9
|
+
apt-get clean
|
|
10
|
+
RUN ln -s /usr/bin/python3 /usr/bin/python
|
|
11
|
+
|
|
12
|
+
# Install pip and the package
|
|
13
|
+
# for now pip 25 is not supported
|
|
14
|
+
RUN pip install --upgrade "pip<25"
|
|
15
|
+
COPY . ./
|
|
16
|
+
RUN pip install .
|
|
17
|
+
|
|
18
|
+
#RUN python octopi/entry_points/run_optuna.py
|
|
19
|
+
ENTRYPOINT ["python3", "octopi/entry_points/run_optuna.py"]
|
|
@@ -17,15 +17,15 @@ copies of the Software, and to permit persons to whom the Software is
|
|
|
17
17
|
furnished to do so, subject to the following conditions:
|
|
18
18
|
|
|
19
19
|
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
20
|
+
copies or substantial portions of the "Software".
|
|
21
21
|
|
|
22
22
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
23
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
24
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
25
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
26
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE "SOFTWARE" OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
"SOFTWARE".
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## License Notice for Dependencies
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: octopi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Model architecture exploration for cryoET particle picking
|
|
5
|
+
Project-URL: Homepage, https://github.com/chanzuckerberg/octopi
|
|
6
|
+
Project-URL: Documentation, https://chanzuckerberg.github.io/octopi/
|
|
7
|
+
Project-URL: Issues, https://github.com/chanzuckerberg/octopi/issues
|
|
8
|
+
Author: Jonathan Schwartz, Kevin Zhao, Daniel Ji, Utz Ermel
|
|
5
9
|
License: MIT
|
|
6
|
-
|
|
7
|
-
Requires-Python: >=3.9,<4.0
|
|
10
|
+
License-File: LICENSE
|
|
8
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
12
|
Classifier: Programming Language :: Python :: 3
|
|
10
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -12,28 +15,41 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
21
|
+
Requires-Python: >=3.9
|
|
15
22
|
Requires-Dist: copick
|
|
23
|
+
Requires-Dist: copick-utils
|
|
16
24
|
Requires-Dist: ipywidgets
|
|
17
25
|
Requires-Dist: kaleido
|
|
18
26
|
Requires-Dist: matplotlib
|
|
19
|
-
Requires-Dist: mlflow
|
|
20
|
-
Requires-Dist: monai
|
|
27
|
+
Requires-Dist: mlflow
|
|
28
|
+
Requires-Dist: monai
|
|
21
29
|
Requires-Dist: mrcfile
|
|
22
30
|
Requires-Dist: multiprocess
|
|
23
31
|
Requires-Dist: nibabel
|
|
24
|
-
Requires-Dist: optuna
|
|
32
|
+
Requires-Dist: optuna
|
|
25
33
|
Requires-Dist: optuna-integration[botorch,pytorch-lightning]
|
|
26
34
|
Requires-Dist: pandas
|
|
27
|
-
Requires-Dist: plotly
|
|
28
35
|
Requires-Dist: python-dotenv
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist: requests (>=2.25.1,<3.0.0)
|
|
31
|
-
Requires-Dist: seaborn
|
|
36
|
+
Requires-Dist: requests
|
|
32
37
|
Requires-Dist: torch-ema
|
|
33
38
|
Requires-Dist: tqdm
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: black>=24.8.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest>=6.2.3; extra == 'dev'
|
|
43
|
+
Requires-Dist: ruff>=0.6.4; extra == 'dev'
|
|
44
|
+
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: mkdocs; extra == 'docs'
|
|
46
|
+
Requires-Dist: mkdocs-awesome-pages-plugin; extra == 'docs'
|
|
47
|
+
Requires-Dist: mkdocs-git-authors-plugin; extra == 'docs'
|
|
48
|
+
Requires-Dist: mkdocs-git-committers-plugin-2; extra == 'docs'
|
|
49
|
+
Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == 'docs'
|
|
50
|
+
Requires-Dist: mkdocs-material; extra == 'docs'
|
|
51
|
+
Requires-Dist: mkdocs-minify-plugin; extra == 'docs'
|
|
52
|
+
Requires-Dist: mkdocs-redirects; extra == 'docs'
|
|
37
53
|
Description-Content-Type: text/markdown
|
|
38
54
|
|
|
39
55
|
# OCTOPI 🐙🐙🐙
|
|
@@ -63,10 +79,16 @@ Our deep learning-based pipeline streamlines the training and execution of 3D au
|
|
|
63
79
|
|
|
64
80
|
### Installation
|
|
65
81
|
|
|
82
|
+
Octopi is availableon PyPI and can be installed using pip:
|
|
66
83
|
```bash
|
|
67
84
|
pip install octopi
|
|
68
85
|
```
|
|
69
86
|
|
|
87
|
+
⚠️ **Note**: One of the current dependencies is currently not working with pip 25. To temporarily reduce the pip version, run:
|
|
88
|
+
```bash
|
|
89
|
+
pip install --upgrade "pip<25"
|
|
90
|
+
```
|
|
91
|
+
|
|
70
92
|
### Basic Usage
|
|
71
93
|
|
|
72
94
|
octopi provides two main command-line interfaces:
|
|
@@ -74,35 +96,25 @@ octopi provides two main command-line interfaces:
|
|
|
74
96
|
```bash
|
|
75
97
|
# Main CLI for training, inference, and data processing
|
|
76
98
|
octopi --help
|
|
77
|
-
```
|
|
78
99
|
|
|
79
|
-
The main `octopi` command provides subcommands for:
|
|
80
|
-
- Data import and preprocessing
|
|
81
|
-
- Training label preparation
|
|
82
|
-
- Model training and exploration
|
|
83
|
-
- Inference and particle localization
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
100
|
# HPC-specific CLI for submitting jobs to SLURM clusters
|
|
87
101
|
octopi-slurm --help
|
|
88
102
|
```
|
|
89
103
|
|
|
90
|
-
The `octopi-slurm` command provides utilities for:
|
|
91
|
-
- Submitting training jobs to SLURM clusters
|
|
92
|
-
- Managing distributed inference tasks
|
|
93
|
-
- Handling batch processing on HPC systems
|
|
94
|
-
|
|
95
104
|
## 📚 Documentation
|
|
96
105
|
|
|
97
106
|
For detailed documentation, tutorials, CLI and API reference, visit our [documentation](https://chanzuckerberg.github.io/octopi/).
|
|
98
107
|
|
|
99
108
|
## 🤝 Contributing
|
|
100
109
|
|
|
101
|
-
|
|
110
|
+
## Code of Conduct
|
|
111
|
+
|
|
112
|
+
This project adheres to the Contributor Covenant [code of conduct](https://github.com/chanzuckerberg/.github/blob/master/CODE_OF_CONDUCT.md).
|
|
113
|
+
By participating, you are expected to uphold this code.
|
|
114
|
+
Please report unacceptable behavior to [opensource@chanzuckerberg.com](mailto:opensource@chanzuckerberg.com).
|
|
102
115
|
|
|
103
116
|
## 🔒 Security
|
|
104
117
|
|
|
105
118
|
If you believe you have found a security issue, please responsibly disclose by contacting us at security@chanzuckerberg.com.
|
|
106
119
|
|
|
107
120
|
|
|
108
|
-
|
|
@@ -25,10 +25,16 @@ Our deep learning-based pipeline streamlines the training and execution of 3D au
|
|
|
25
25
|
|
|
26
26
|
### Installation
|
|
27
27
|
|
|
28
|
+
Octopi is availableon PyPI and can be installed using pip:
|
|
28
29
|
```bash
|
|
29
30
|
pip install octopi
|
|
30
31
|
```
|
|
31
32
|
|
|
33
|
+
⚠️ **Note**: One of the current dependencies is currently not working with pip 25. To temporarily reduce the pip version, run:
|
|
34
|
+
```bash
|
|
35
|
+
pip install --upgrade "pip<25"
|
|
36
|
+
```
|
|
37
|
+
|
|
32
38
|
### Basic Usage
|
|
33
39
|
|
|
34
40
|
octopi provides two main command-line interfaces:
|
|
@@ -36,31 +42,22 @@ octopi provides two main command-line interfaces:
|
|
|
36
42
|
```bash
|
|
37
43
|
# Main CLI for training, inference, and data processing
|
|
38
44
|
octopi --help
|
|
39
|
-
```
|
|
40
45
|
|
|
41
|
-
The main `octopi` command provides subcommands for:
|
|
42
|
-
- Data import and preprocessing
|
|
43
|
-
- Training label preparation
|
|
44
|
-
- Model training and exploration
|
|
45
|
-
- Inference and particle localization
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
46
|
# HPC-specific CLI for submitting jobs to SLURM clusters
|
|
49
47
|
octopi-slurm --help
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
The `octopi-slurm` command provides utilities for:
|
|
53
|
-
- Submitting training jobs to SLURM clusters
|
|
54
|
-
- Managing distributed inference tasks
|
|
55
|
-
- Handling batch processing on HPC systems
|
|
56
|
-
|
|
57
50
|
## 📚 Documentation
|
|
58
51
|
|
|
59
52
|
For detailed documentation, tutorials, CLI and API reference, visit our [documentation](https://chanzuckerberg.github.io/octopi/).
|
|
60
53
|
|
|
61
54
|
## 🤝 Contributing
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
## Code of Conduct
|
|
57
|
+
|
|
58
|
+
This project adheres to the Contributor Covenant [code of conduct](https://github.com/chanzuckerberg/.github/blob/master/CODE_OF_CONDUCT.md).
|
|
59
|
+
By participating, you are expected to uphold this code.
|
|
60
|
+
Please report unacceptable behavior to [opensource@chanzuckerberg.com](mailto:opensource@chanzuckerberg.com).
|
|
64
61
|
|
|
65
62
|
## 🔒 Security
|
|
66
63
|
|