Skip to content

feat: generate the inference flag tables from AlphaPulldown and check them in CI - #73

Merged
DimaMolod merged 1 commit into
mainfrom
feat/generated-flag-tables
Oct 14, 2026
Merged

DimaMolod merged 1 commit into
mainfrom
feat/generated-flag-tables

Conversation

@DimaMolod

Copy link
Copy Markdown
Collaborator

Plan item 3 of 3: generate the workflow's inference-flag tables from AlphaPulldown, and enforce them in CI.

Problem

common.smk held hand-copied per-backend flag sets. The test comparing them with AlphaPulldown skipped wherever AlphaPulldown was not importable, which includes every CI run. The sets had drifted before.

Change

  • tools/generate_inference_flag_tables.py --source-checkout PATH [--check].
    • Reads FLAGS_BY_BACKEND from an explicit AlphaPulldown checkout by evaluating its syntax tree. Nothing is imported, and no dependencies or submodules are needed.
    • Refuses a source file with uncommitted changes, and records the full commit.
    • Writes a sorted, clearly marked block into common.smk. No runtime imports, network access or schema files.
    • Its --help documents the update procedure: check out the intended revision, regenerate, inspect the diff, run the compatibility tests.
  • The first block comes from 2.10.0 (6e7f9869), the release the default containers run. It equals the hand-copied sets exactly: 38, 21 and 38 flags for alphafold2, alphafold3 and alphalink.
  • New CI job inference-flag-tables. It reads the recorded commit, checks out that AlphaPulldown revision without submodules, and runs --check. A missing source or any difference fails the job instead of skipping. To make the job required, main needs branch protection, which this repo doesn't have yet. That's a settings change left to the maintainers.

Tests

  • Replaced: the hand-copied expected-set test gives way to generator tests on a throwaway git checkout:
    • output is deterministic;
    • --check writes nothing;
    • a removed or renamed flag fails --check;
    • an uncommitted source is refused;
    • a missing source fails rather than skips;
    • common.smk parses with no AlphaPulldown.
  • Kept: the behavioural tests (ModelCIF, fast kernels and compile-cache flags on both backends) and the default-container compatibility tests.
  • Full suite with Snakemake on PATH, so every dry run executes: 220 passed, none skipped. On main: 213 passed, 1 skipped, the old import-or-skip test.
  • Dry runs against main: the AF2 and AF3 fixtures, and AF3 with the unsupported --allow_resume plus a misspelt flag. They produce identical commands, manifests, output targets and warnings. Timestamps, Snakemake's random file-set order and its scheduling notes are normalised out.

When an AlphaPulldown release with AF3 --allow_resume ships, #72 regenerates the block from that release instead of editing the set by hand.

🤖 Generated with Claude Code

… them in CI

The per-backend flag sets in common.smk were copied from AlphaPulldown by hand,
and the test comparing them with the original skipped wherever AlphaPulldown was
not importable, which is everywhere CI runs. They drifted before.

tools/generate_inference_flag_tables.py reads FLAGS_BY_BACKEND from an explicit,
clean AlphaPulldown checkout (its syntax tree: no import, no dependencies, no
submodules) and writes a sorted block into common.smk recording the full source
commit. The first block comes from 2.10.0 (6e7f9869), the release the default
containers run, and equals the hand-copied sets exactly. A new CI job checks out
the recorded commit and runs the generator with --check; a missing source or any
difference fails it. The generator's --help documents the update procedure.

The hand-copied expected-set test gives way to tests of the generator on a
throwaway checkout: deterministic output, a --check that writes nothing, failure
on a removed or renamed flag, refusal of an uncommitted source, failure rather
than a skip without a source, and parsing with no AlphaPulldown. Behavioural
tests of the tables are kept. AF2, AF3 and unknown-flag dry runs produce the
same commands, manifests, targets and warnings as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DimaMolod
DimaMolod merged commit adee91a into main Oct 14, 2026
3 checks passed
@DimaMolod
DimaMolod deleted the feat/generated-flag-tables branch October 14, 2026 09:03
DimaMolod added a commit that referenced this pull request Oct 14, 2026
The flag tables are now generated (#73): AF3's --allow_resume comes from
regenerating them from AlphaPulldown main (228c5eed), where AF3 accepts the
flag, in place of the hand edit. The wording names the release that ships it,
2.11.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant