Skip to content

feat: schedule resident inference batches - #53

Draft
DimaMolod wants to merge 9 commits into
mainfrom
feat/resident-inference
Draft

feat: schedule resident inference batches#53
DimaMolod wants to merge 9 commits into
mainfrom
feat/resident-inference

Conversation

@DimaMolod

@DimaMolod DimaMolod commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve the existing size-aware bin_folds grouping
  • run compatible folds in one resident AlphaPulldown process
  • keep AF2 monomer and multimer batches homogeneous
  • retain the legacy single-fold path when batching is disabled or unavailable
  • account for batch runtime by count while using the largest-fold memory estimate

Tests

  • workflow suite: 55 passed
  • representative AF2 and AF3 dry-runs passed
  • GitHub CI: Python 3.10 and 3.12 passed

Depends on and complements KosinskiLab/AlphaPulldown#636.

Related MMseqs2-GPU workflow PR: #54.

DimaMolod and others added 7 commits September 3, 2026 13:40
…sident

AlphaFold2 compiles per input shape, so a resident batch whose folds differ in
length recompiles for each one and saves nothing. A resident batch also keeps its
compiled model in memory, so the on-disk compile cache it was being given is
redundant there.

- add --desired_num_res for AF2 multimer batches, sized from the batch's largest
  fold, so the batch compiles once
- build a separate resident CLI without --jax_compilation_cache_dir
- accept --jax_compilation_cache_dir on AF2 in the parse-time flag check, so it
  can be set explicitly in structure_inference_arguments

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
config.yaml had grown to 248 lines of which 180 were comments, making the ~34
actual settings hard to find.

- group config.yaml into REQUIRED / COMMON / ADVANCED, one or two comment lines
  per key naming the README section that documents it (248 -> 134 lines, every
  key and default unchanged)
- document the three sections in README
- describe AF2 shape padding in the batching section, and drop the calibration
  caveat about resident allocator retention
- correct the claim that --jax_compilation_cache_dir is AlphaFold3-only, and
  note the network-filesystem failure mode

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
batch_padding_args was reading staged features, the same instability that
_fold_grouping_tokens exists to avoid, and an unresolved length could have padded
a batch to fewer residues than its largest fold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The copied table omitted convert_to_modelcif, so setting a valid flag on AlphaFold3
produced a "backend does not recognise" warning. AlphaPulldown is not importable at
parse time, so the copy has to stay; record where truth lives and pin the sets in a
test, since this has drifted once already.

Co-Authored-By: Claude Opus 5 (1M context) <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