feat: add reusable workflow orchestration runtime#23
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Modal-based PPIFlow workflow orchestrator under src/biomodals/workflow/ that coordinates multiple deployed Biomodals apps to reproduce the upstream two-stage pipeline and package results as a .tar.zst.
Changes:
- Replace the previous monolithic PPIFlow runner with a workflow orchestrator that calls deployed apps (PPIFlow/LigandMPNN/FlowPacker/AF3Score/AlphaFold3/Rosetta/DockQ).
- Add a new DockQ Biomodals app and add workflow-oriented “*_bytes” helpers to PPIFlow, AF3Score, and Rosetta for in-memory/byte-based orchestration.
- Add workflow development and PPIFlow workflow documentation.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/biomodals/workflow/ppiflow_workflow.py | New workflow orchestrator implementing stage1/stage2 execution, queue-based fanout, filtering, refold/relax, dockq, and report packaging. |
| src/biomodals/app/score/dockq_app.py | New DockQ scoring app with batch function and CSV-driven entrypoint. |
| src/biomodals/app/score/af3score_app.py | Adds af3score_run_bytes to score in-memory PDBs and return a packaged archive for workflows. |
| src/biomodals/app/design/ppiflow_app.py | Adds ppiflow_run_bytes to run PPIFlow from in-memory inputs and return a packaged archive for workflows. |
| src/biomodals/app/bioinfo/rosetta_app.py | Adds run_rosetta_batch_bytes for in-memory Rosetta batch execution and packaging. |
| docs/agents/workflow-development.md | Documents workflow conventions, interfaces, and operational guidelines. |
| docs/agents/ppiflow-workflow.md | Documents ppiflow workflow app dependencies and design tradeoffs. |
| AGENTS.md | Adds a pointer to workflow development guidance for workflow changes. |
y1zhou
commented
May 7, 2026
b7262bf to
b3a0619
Compare
Merged
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
This PR is primarily a general workflow-orchestration change. It adds the shared schemas, runtime, ledger, Modal orchestrator boundary, CLI/catalog plumbing, and app-function contracts needed to compose Biomodals apps into durable workflows. PPIFlow is updated as one consumer of that infrastructure, but the reusable runtime and workflow-compatible app surface are the main scope.
Full Diff Summary
Compared with
main, this branch changes 68 files: 9,271 insertions and 2,001 deletions.Workflow Runtime and Schemas
src/biomodals/schema/:AppConfig,AppRunResult,AppOutput, andAppRunStatusInlineBytesandVolumePathstorage contractssrc/biomodals/workflow/core/:builder.pyfor Python-first DAG construction and dependency validationnodes.pyfor workflow node interfaces and node run contextartifacts.pyfor materializing inline/volume app outputs into workflow artifactsledger.pyfor SQLite-backed durable run, node, attempt, remote-call, artifact, and input/output stateruntime.pyfor scheduling ready nodes, bounded parallel execution, remote node dispatch, run resumption, DAG hash checks, and volume syncorchestrator.pyfor the ModalWorkflowOrchestratorclass boundary and isolated remote node executionsrc/biomodals/workflow/__init__.pyexports for workflow construction and core types.Workflow Applications
src/biomodals/workflow/shortmd_workflow.py, a reusable ShortMD workflow built on the new runtime:submit_shortmd_workflowsrc/biomodals/workflow/ppiflow_workflow.pyfrom the previous draft into an app-orchestrated workflow script that stages YAML inputs, coordinates deployed Biomodals apps, runs queue-based parallel per-structure tasks, filters/ranks outputs, and packages the final run directory.CLI, Catalog, and Helper Refactor
biomodals app ...andbiomodals workflow ...namespaces while keeping deprecated top-level app aliases for compatibility.biomodals.app.catalogtobiomodals.helper.catalogand extends it to discover workflow scripts.biomodals.app.constanttobiomodals.helper.constantand adds a shared workflow-orchestrator volume.biomodalshelper script to routeappandworkflowsubcommands.Workflow-Compatible App Contracts
src/biomodals/app/score/dockq_app.pywith batch DockQ scoring, CSV output, tarball packaging, and a local entrypoint..pipe(patch_image_for_helper)pattern.AppRunResultarchive output backed by a Modal volumeBuild, Tooling, Docs, and Examples
modalto>=1.4.3, addsorjson, addspytestto dev dependencies, and moves Ruff configuration intopyproject.toml.rumdl.biomodalshelper and namespacedbiomodals app r ...commands.CONTEXT.mdanddocs/agents/workflow-development.md, and updates app-development agent guidance for shared schemas, helper reuse, and workflow-compatible app functions..gitignoreentries for.zed/andPLAN.md.Tests Added or Updated
Validation
Previously exercised during this branch:
compileall src/biomodalsuv run biomodals app listuv run biomodals app help ppiflowuv run biomodals app help dockquv run biomodals app help af3scoreuv run biomodals app help rosettauv run biomodals workflow listmodal run ppiflow_workflow.py --helpprek run/prek run --files ...on changed filesAdditional local spot check while reviewing the final diff:
rtk uv run pytest tests/workflow/test_runtime.py tests/workflow/test_ppiflow_workflow_inputs.py tests/app/test_cli_workflow_catalog.pyNot Run