Fix AF2 depth scans, feature outputs, CPU imports and contact parsing; disable unsupported UniFold - #643
Merged
Conversation
…, GPU-less import - AlphaFold 2 setup registered one RunModel under every MSA depth while rewriting its single config in place, so --msa_depth_scan predicted N times at the last depth, differing only by seed. Each distinct depth now gets its own config and runner; parameters are still loaded once per model name. - --save_features_for_multimeric_object read feature_dict off the MultimericObject class (AttributeError on every run) and ran before the fold directory existed. It now pickles the built object's features into the fold's own directory once that exists. - The UniFold backend required output_dir and multimeric_object in setup() and took one object in an instance-method predict(), so no adapter could call it. It now follows the backend contract; --unifold_model_name is defined by run_structure_prediction, forwarded by run_multimer_jobs, validated for the unifold backend, and kept for multimers instead of being replaced by the AlphaFold 2 "multimer" preset. - The import-time jax.local_devices(backend='gpu') probe raised on any machine without a GPU, so --help and head-node flag validation failed. It is now a tolerant helper (alphapulldown.prediction.jax_devices) that still runs before the backends import TensorFlow and OpenMM. - ChoppedObject kept only the first region's template_sequence fragment when concatenating regions; fragments are now joined per template, so the sequence matches the chopped chain length. - distogram_parser.get_contacts referenced an undefined `datadir` and re-read whichever pickle the scan visited last rather than the top-ranked one. - requires-python is 3.10: the package uses slots dataclasses and zip(strict=True), and CI runs 3.10 and 3.11. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mkya8Y3utHEPbVPc2RbJu3
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reject legacy UniFold selectors before input processing because the bundled AlphaLink fork lacks a compatible native UniFold inference API and network. Keep legacy flags/imports parseable for an actionable error and document the release limitation without advertising unsupported model configurations. Preserve pytest parameter IDs: the previous docstring rewrite made xdist loadfile silently omit cases. A subprocess regression now verifies that a failing second parameter fails both serial and parallel execution. Include every complete AF2 distogram bin at or below the distance cutoff, with regressions matching the real 64-bin/63-edge output representation. Validation: 748 passed, 12 skipped in both serial and xdist CPU suites; identical 760 executed test identities including skips. Fresh MMseqs features generated; AF2 depth-scan and AF3 species-pairing GPU checks submitted separately.
Canonical pytest IDs exposed two previously omitted import-order cases. Their subprocesses intentionally bypass pytest stubs and need the real AF2 JAX tree API. Install the supported CPU JAX version in smoke and coverage jobs without enabling CUDA dependencies.
Coverage exposed an order-dependent fake mmCIF parser leaking from the backend fixture into real ModelCIF checks. Scope module and JAX attribute replacements to the fixture, including setup failures. Add a serial subprocess regression for the reproducing module order. The original probe failed; the corrected probe and all 43 related tests pass.
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
Fix advertised AlphaFold 2 options and analysis helpers, and make the release's supported backend boundary explicit.
RunModel; load parameters once per model and retain runner reuse for fixed-depth/default predictions.--use_ap_styledirectories.unifoldnamespace belongs to the AlphaLink2 fork and is not a validated native UniFold runtime. Backend discovery and documentation list AF2, AF3, and AlphaLink; AlphaLink requires its own weights.xdist --dist loadfileto silently omit cases. A subprocess regression now checks that an intentionally failing second parameter fails serial and parallel execution.Validation
ihm, Torch, and compiled AF3 unavailable in that environment).-n 4 --dist loadfile): 749 passed, 12 skipped; exactly the same 761 test identities, including skips, as the serial run.2128f446.UniFold restoration is outside this release: it requires a compatible runtime and validation with native UniFold weights.
Final coverage: 82.5%. Additional AF3 fixture-isolation suite: 43 passed.