Skip to content

MILAB-6679: add the 3.12.10-antibody-design python run environment - #108

Open
vgpopov wants to merge 3 commits into
mainfrom
MILAB-6679/antibody-design-runenv
Open

vgpopov wants to merge 3 commits into
mainfrom
MILAB-6679/antibody-design-runenv

Conversation

@vgpopov

@vgpopov vgpopov commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Why

The Antibody Variant Designer block has no run environment. Both of its software packages (software-developability, software-antifold) declare toolset: pip and install their whole closure on every run — AntiFold's torch stack, Sapiens, freesasa, promb — roughly 2 GiB, on every executor.

This names that closure once and ships it as an environment, so the block can reference it and stop installing at run time.

What is in it

The closure was resolved with uv pip compile --universal from the block's two exported requirement sets, then written out flat. Top-level: torch 2.2.2, torch_geometric 2.4.0, transformers 4.44.2, sapiens 1.1.0, biotite, biopython 1.83, numpy 1.26.4, pandas 2.3.3, scipy 1.16.3, freesasa 2.2.1, promb 1.0.2.

Three decisions worth reading

torch is per platform. The linux-x64 PyPI wheel requires twelve nvidia-* CUDA packages this block never uses. That platform takes torch==2.2.2+cpu from https://download.pytorch.org/whl/cpu, which shared-config.json already lists as an additional registry. The other four take the plain pin — their PyPI wheels are CPU builds, and the nvidia-* requirements are marked linux-x86_64 only.

freesasa builds on the runner for all five platforms. It has never published a cp312 wheel. This copies the base 3.12.10 environment's buildWheel entry verbatim, MSVC note included.

biotite is pinned at 0.39.0, not the block's 0.38.*. 0.38 predates cp312 and publishes no wheel any Python 3.12 can install, so holding that bound would mean a source build on all five platforms, Windows included. 0.39.0 is the first line with cp312 wheels. It still has no Linux ARM64 wheel for any version, so that one platform compiles its Cython sources on the native ARM runner.

Follow-up outside this repo

The block must move its biotite bound to 0.39 and swap toolset: pip for "environment": "@platforma-open/milaboratories.runenv-python-3:3.12.10-antibody-design" once this publishes. Separate PR in platforma-open/antibody-variant-designer.

Check

CI is the first real proof the five roots build — in particular the aarch64 biotite compile and the Windows freesasa compile.

Greptile Summary

Adds the 3.12.10-antibody-design Python runtime, registers it across the pnpm workspace, five-platform CI matrix, and public catalogue, and pins the Antibody Variant Designer dependency closure. The package selects a CPU-only Torch wheel for Linux x64 and source-builds packages where CPython 3.12 wheels are unavailable.

  • Adds a five-platform Python 3.12.10 runtime package and catalogue entry.
  • Pins the AntiFold, Sapiens, FreeSASA, promb, and supporting scientific stack.
  • Uses platform-specific Torch distributions.
  • Configures FreeSASA source builds everywhere and a Biotite source build on Linux ARM64.
  • Adds release metadata for the runtime and catalogue.

Important touched terms

Term Definition Change
3.12.10-antibody-design run environment A packaged Python 3.12.10 environment dedicated to the Antibody Variant Designer workload. Added as a workspace package, catalogue entrypoint, and five-platform CI target.
Runtime closure The complete set of direct and transitive packages needed by a workload. Added as an explicitly pinned dependency list rather than inheriting the base profile’s packages.
Flat dependency pinning Listing every package in the closure at an exact version. Used to make runtime contents deterministic and avoid dependency installation during each block run.
platformSpecific Configuration selected according to operating system and CPU architecture. Added a Torch dependency for each supported platform.
torch==2.2.2+cpu PyTorch’s CPU-only 2.2.2 distribution from its CPU wheel registry. Selected for Linux x64 to avoid the unused NVIDIA dependency stack.
torch-geometric A graph neural-network extension library used by AntiFold. Added at version 2.4.0.
sapiens / transformers Packages providing the humanness model and its transformer runtime. Added to the pinned runtime closure.
freesasa A native library for solvent-accessible surface-area calculations. Pinned to 2.2.1 and configured to build from source on all five platforms.
biotite A computational-biology library for sequence and structure processing. Pinned to 0.39.0, with source compilation configured for Linux ARM64.
buildWheel Builder policy that compiles a source distribution into a wheel for a specified platform. Added for FreeSASA on every target and Biotite on Linux ARM64.
strictMissing Resolution policy controlling whether an unavailable dependency fails the build or is skipped. Explicitly disabled for the new profile, permitting incomplete artifacts when ordinary dependencies cannot be resolved.
Catalogue entrypoint A stable public name pointing to a runtime package’s generated environment descriptor. Added 3.12.10-antibody-design referencing the new package’s main.sw.json.

Confidence Score: 4/5

The PR appears safe to merge, with non-blocking hardening needed to reject incomplete dependency resolution and verify representative workload imports.

Package publication wiring and platform configuration are internally aligned, but permissive dependency resolution can silently omit packages and the existing native checker does not prove that the intended Antibody Variant Designer entry paths execute successfully.

Files Needing Attention: python-3.12.10-antibody-design/config.json

Important Files Changed

Filename Overview
python-3.12.10-antibody-design/config.json Defines the complete pinned closure and platform build policies; permissive missing-dependency handling and absent workload smoke coverage merit attention.
python-3.12.10-antibody-design/package.json Defines a conventional five-platform Python environment package whose identity and roots align with CI and catalogue registration.
.github/workflows/build.yaml Adds matching native-runner matrix entries for every platform root advertised by the new package.
catalogue/package.json Adds an aligned public entrypoint and workspace dependency for the antibody-design runtime.
pnpm-workspace.yaml Registers the new runtime package in the pnpm workspace.
pnpm-lock.yaml Adds the expected workspace importer and local links for the new package.
.changeset/antibody-design-runenv.md Records minor releases for both the new runtime and the catalogue.
python-3.12.10-antibody-design/README.md Documents the runtime’s workload, dependency strategy, Torch split, and required source builds.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Antibody Variant Designer] --> B[Catalogue entry: 3.12.10-antibody-design]
  B --> C[Runtime package]
  C --> D[Flat pinned dependency closure]
  D --> E{Target platform}
  E -->|Linux x64| F[Torch 2.2.2 CPU wheel]
  E -->|Linux ARM64| G[Torch 2.2.2 + source-built Biotite]
  E -->|macOS x64 or ARM64| H[Torch 2.2.2]
  E -->|Windows x64| I[Torch 2.2.2]
  F --> J[Source-built FreeSASA]
  G --> J
  H --> J
  I --> J
  J --> K[Native-import validation]
  K --> L[Published environment artifact]
Loading

Fix all with Greploop Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
python-3.12.10-antibody-design/config.json:79-81
**Dependencies Can Be Silently Skipped**

Setting `strictMissing` to `false` allows an unavailable ordinary dependency to be logged and skipped. This profile can therefore produce and publish an incomplete environment even though it promises a complete dependency closure across five platforms. Make resolution fail when any declared dependency cannot be obtained.

```suggestion
    "resolution": {
      "strictMissing": true
    },
```

### Issue 2
python-3.12.10-antibody-design/config.json:3-47
**Workload Imports Are Not Tested**

The new environment has no smoke test for its intended imports or workflows. Existing CI only imports detected native extension modules, treats pure-Python wheels as successful without importing them, and can ignore `ModuleNotFoundError` during native probes. Add a minimal test covering the AntiFold, Sapiens, FreeSASA, and promb entry paths so an unusable environment is not published successfully.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "MILAB-6679: add the 3.12.10-antibody-des..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used (5)

The Antibody Variant Designer block installs its whole python closure with pip
on every run — AntiFold's torch stack, Sapiens, freesasa and promb, about 2 GiB
of it — because no run environment carries that set. Both of its software
packages pay the cost, on every executor, on every run.

This names the closure once and ships it as an environment, so the block's
software packages can drop `toolset: pip` and reference it instead.

torch is declared per platform rather than in the shared list: the linux-x64
PyPI wheel requires twelve nvidia-* CUDA packages the block never uses, so that
platform takes torch==2.2.2+cpu from the pytorch cpu index the shared config
already registers. The other four take the plain pin, whose wheels are CPU
builds.

freesasa is built on the runner everywhere, copying the base 3.12.10
environment — it has never published a cp312 wheel. biotite is built on the
runner for linux-aarch64 alone, the one platform with no wheel for any version.

biotite is pinned at 0.39.0 rather than the block's 0.38.*: 0.38 predates
cp312 and publishes nothing Python 3.12 can install, so holding that bound
would mean a source build on all five platforms. The block's own bound moves
with this.
Comment on lines +79 to +81
"resolution": {
"strictMissing": false
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Dependencies Can Be Silently Skipped

Setting strictMissing to false allows an unavailable ordinary dependency to be logged and skipped. This profile can therefore produce and publish an incomplete environment even though it promises a complete dependency closure across five platforms. Make resolution fail when any declared dependency cannot be obtained.

Suggested change
"resolution": {
"strictMissing": false
},
"resolution": {
"strictMissing": true
},

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: python-3.12.10-antibody-design/config.json
Line: 79-81

Comment:
**Dependencies Can Be Silently Skipped**

Setting `strictMissing` to `false` allows an unavailable ordinary dependency to be logged and skipped. This profile can therefore produce and publish an incomplete environment even though it promises a complete dependency closure across five platforms. Make resolution fail when any declared dependency cannot be obtained.

```suggestion
    "resolution": {
      "strictMissing": true
    },
```

**Knowledge Base Used:**
- [Build configuration composition](https://app.greptile.com/milaboratories/-/custom-context/knowledge-base/platforma-open/runenv-python-3/-/docs/build-configuration-composition.md)
- [CI build workflow](https://app.greptile.com/milaboratories/-/custom-context/knowledge-base/platforma-open/runenv-python-3/-/docs/ci-build-workflow.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

Comment on lines +3 to +47
"dependencies": [
"biopython==1.83",
"biotite==0.39.0",
"certifi==2026.7.22",
"charset-normalizer==3.5.1",
"cloudpickle==3.1.2",
"colorama==0.4.6",
"filelock==3.32.6",
"freesasa==2.2.1",
"fsspec==2026.7.0",
"hf-xet==1.6.0",
"huggingface-hub==0.36.2",
"idna==3.19",
"jinja2==3.1.6",
"joblib==1.6.0",
"markupsafe==3.0.3",
"mpmath==1.3.0",
"msgpack==1.2.2",
"narwhals==2.26.0",
"networkx==3.6.1",
"numpy==1.26.4",
"packaging==26.3",
"pandas==2.3.3",
"promb==1.0.2",
"psutil==7.2.2",
"pyparsing==3.3.2",
"python-dateutil==2.9.0.post0",
"pytz==2026.3.post1",
"pyyaml==6.0.3",
"regex==2026.9.10",
"requests==2.34.2",
"safetensors==0.8.0",
"sapiens==1.1.0",
"scikit-learn==1.9.1",
"scipy==1.16.3",
"six==1.17.0",
"sympy==1.14.0",
"threadpoolctl==3.6.0",
"tokenizers==0.19.1",
"torch-geometric==2.4.0",
"tqdm==4.70.1",
"transformers==4.44.2",
"typing-extensions==4.16.0",
"tzdata==2026.4",
"urllib3==2.7.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Workload Imports Are Not Tested

The new environment has no smoke test for its intended imports or workflows. Existing CI only imports detected native extension modules, treats pure-Python wheels as successful without importing them, and can ignore ModuleNotFoundError during native probes. Add a minimal test covering the AntiFold, Sapiens, FreeSASA, and promb entry paths so an unusable environment is not published successfully.

Knowledge Base Used: CI build workflow

Prompt To Fix With AI
This is a comment left during a code review.
Path: python-3.12.10-antibody-design/config.json
Line: 3-47

Comment:
**Workload Imports Are Not Tested**

The new environment has no smoke test for its intended imports or workflows. Existing CI only imports detected native extension modules, treats pure-Python wheels as successful without importing them, and can ignore `ModuleNotFoundError` during native probes. Add a minimal test covering the AntiFold, Sapiens, FreeSASA, and promb entry paths so an unusable environment is not published successfully.

**Knowledge Base Used:** [CI build workflow](https://app.greptile.com/milaboratories/-/custom-context/knowledge-base/platforma-open/runenv-python-3/-/docs/ci-build-workflow.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

Every platform failed the native import checker on biotite: numpy.core.multiarray
failed to import, once per Cython module.

The cause is not biotite. biopython, promb and sapiens pin nothing, and the
builder resolves each declared package's closure on its own, so all three pulled
the newest of everything on top of the pins — numpy 2.5.3 beside 1.26.4, scipy
1.18.1 beside 1.16.3, plus pandas 3.0.5, torch 2.14 and transformers 5. The
checker installs from the package directory and picks the newest that satisfies
the wheel, so it built its venv on numpy 2 and every numpy-1-ABI extension in
the set broke. A local venv on the pinned numpy imports biotite 0.39.0 fine.

The three are now under noDeps, the same answer 3.12.10-hilary reached for the
same cause. Their dependencies are all named in the flat list already.

torch's functorch._C fails its import check on every torch build, which is why
2.7.0 and 2.9.1 are already whitelisted on four platforms and 2.2.2 on
macosx-x64. The remaining four platforms get the 2.2.2 entry.
The first noDeps round covered the three packages that pulled a duplicate in
that run. The next run found two more — biotite asks for a bare numpy and
scikit-learn for a bare scipy — so numpy 2.5.3 and scipy 1.18.1 came back and
biotite failed its import check on all five platforms again.

Chasing one puller per round does not end, because the builder resolves every
declared package's closure separately and any loose requirement wins over a pin.
So noDeps now covers every package that carries a loose requirement of its own.
The flat closure is what makes that safe: nothing needs resolving, because
everything these packages import is pinned in the same list.

The checker whitelists also gain biotite's 24 numpy-2 ABI errors on all five
platforms. With the noDeps set they should stay unused; they are the guard
against one loose requirement slipping back in and failing five platforms.
vgpopov pushed a commit to platforma-open/antibody-variant-designer that referenced this pull request Sep 17, 2026
Both software packages install their whole python closure at run time — torch,
torch_geometric, transformers, sapiens, freesasa, promb, about 2 GiB — on every
executor. The run environment they name carries none of it: the base 3.12.10
ships torch 2.7 and numpy 2, while these packages need torch 2.2.2 on numpy
1.26, so the offline install had nothing to resolve against.

platforma-open/runenv-python-3#108 adds 3.12.10-antibody-design, which pins
exactly what the two exported requirement files pin. Pointing both artifacts at
it leaves the requirement files as the thing that decides versions, which is
what the offline install reads, and removes the download from every run.

biotite moves to 0.39: 0.38 predates cp312 and publishes no wheel Python 3.12
can install, so no run environment can carry it. 0.39.0 is the first line with
cp312 wheels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants