feat: Huggingface#78
Merged
Merged
Conversation
…all network interfaces' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ult SLURM CPU/mem requests
ESmi99
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for pretrained checkpoints hosted on the Hugging Face Hub, restructures
membrane extraction into a general
extractcommand group, and finishes migrating theCLI to URI-based flags (
--tomo-uri,--seg-uri,--target-uri) across the remainingcommands.
Changes
Hugging Face Hub checkpoints
octopi/utils/hub.py: resolves a checkpoint alias (e.g.tomogram-boundary) againstthe
biohub/octopiHub repo, downloading weights + config on demand and caching locally.Falls back to treating
--model-weightsas a local path when it isn't a known alias.octopi segment/octopi.workflows.segment:--model-configis now optional — omit itwhen
--model-weightsis a Hub alias, since its config is bundled and downloadedautomatically. Still supports comma-separated paths for model-soup ensembles.
huggingface_hubas a dependency (pyproject.toml).extractcommand groupmembrane-extractcommand withoctopi extract, a group withtwo subcommands:
extract mb-picks— the existing membrane-proximity pick splitting (unchanged logic,moved under the group).
extract seg(new,octopi/extract/segmentations.py) — isolates a single object'sbinary mask from a multi-class
segmentprediction, using the inference log written bysegmentto recover voxel size and label mapping.URI-based CLI cleanup
octopi segment: finishes the URI migration — takes--tomo-uri(algorithm@voxel_size)and
--seg-uri(name:user_id/session_id) directly; URI parsing now happens once insideworkflows.segment()instead of in the CLI layer.octopi.workflows.segment()signature changed to(config, model_weights, model_config, tomo_uri, seg_uri, ...)— parses both URIs internally.pytorch/segmentation.pyrenamed topytorch/inference.py(predictor classes only,no behavior change) to disambiguate from the new
extract/segmentations.py.nnUNetCLI group reference fromentry_points/groups.py.MCP server
extractgroup and optional--model-config.get_command_helpnow supports group subcommands (e.g."extract seg").octopi.workflowsPythonAPI when the user is clearly scripting/notebooking, not running a one-off command.
Docs
docs/api/inference.md,docs/user-guide/inference.md,docs/user-guide/labels.md,and others for the new checkpoint-alias workflow and
extractgroup.