Skip to content

fix: report mistyped backend options instead of dropping them - #661

Merged
DimaMolod merged 1 commit into
mainfrom
fix/backend-options
Oct 13, 2026
Merged

DimaMolod merged 1 commit into
mainfrom
fix/backend-options

Conversation

@DimaMolod

@DimaMolod DimaMolod commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #660. Fixes mistyped backend options being dropped silently.

The problem

The adapters call every backend's setup and predict with the whole configuration, so each one took the rest as **kwargs and read its own options with kwargs.get(name, default). A name mistyped on either side, in the configuration table (inference_flags._MODEL_FLAG_SOURCES) or in a backend, fell back to the default without a word. validate_model_configuration could not catch it: it checks the configuration against a key set built from that same table.

The fix

  • Named options. setup and predict of AlphaFold 2, AlphaFold 3 and AlphaLink now name every option they use, as does AF2's predict_individual_job. Options meant for other backends arrive as **other_backends_options and go only to validate_model_configuration, which rejects any that no backend takes.
  • AF3 resume settings. AF3 hands its resume code an explicit dict of the settings it records (num_seeds, num_diffusion_samples, num_recycles, the embedding and distogram switches) instead of its kwargs.
  • Dead option removed. AF3 no longer forwards af3_input_json: nothing supplied it, and prepare_input ignores it.

Tests

  • test_inference_flags reads the three backends' signatures from source, since AF2 and AF3 cannot be imported together. It checks three things:

    • every configuration key is named by some backend;
    • every option a backend names is a configuration key;
    • the unnamed options are only validated, never read.

    Mutation-checked: a mistyped key in the table, a mistyped AF3 predict parameter, and an option read back with .get each fail it.

  • predict of both AlphaFold backends accepts other backends' options and reports a mistyped one.

  • Unit + integration, both release images: the same results as main plus the new tests. AF2 image: 946 passed, 26 skipped. AF3 image: 1017 passed, 15 skipped. The same pre-existing environmental failures.

  • GPU: full AF2 and AF3 suites, which go through these signatures with the real configuration. AF2: 18 passed, 3 skipped. AF3: 38 passed, 1 skipped. None failed. The skips are the expensive tests that the gate in test/cluster/code_changes.py left out because none of their covered paths changed: AF2's two fast-kernel tests and its LocalMmseqs comparison, and AF3's metadata end-to-end test, which passed on refactor: move AF3 model running out of the backend #660.

🤖 Generated with Claude Code

The adapters give every backend's setup and predict the whole configuration,
so each took the rest as **kwargs and read its own options with
kwargs.get(name, default). A name mistyped on either side, in the
configuration table or in a backend, fell back to the default without a word.

setup and predict of AlphaFold 2, AlphaFold 3 and AlphaLink now name every
option they use, and pass the options they do not name, meant for other
backends, to validate_model_configuration, which rejects any no backend takes.
AF3 hands its resume code an explicit dict of the settings it records instead
of its kwargs, and no longer forwards af3_input_json, which nothing supplied.

test_inference_flags reads the backends' signatures from source and checks
both directions: every configuration key is named by some backend, every
named option is a configuration key, and the unnamed options are only
validated, never read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@DimaMolod
DimaMolod changed the base branch from refactor/af3-runner to main October 13, 2026 19:18
@DimaMolod
DimaMolod merged commit 2414fde into main Oct 13, 2026
6 checks passed
@DimaMolod
DimaMolod deleted the fix/backend-options branch October 13, 2026 19:19
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