Repository navigation
fix: report mistyped backend options instead of dropping them - #661
Merged
Merged
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 14, 2026
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.
Stacked on #660. Fixes mistyped backend options being dropped silently.
The problem
The adapters call every backend's
setupandpredictwith the whole configuration, so each one took the rest as**kwargsand read its own options withkwargs.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_configurationcould not catch it: it checks the configuration against a key set built from that same table.The fix
setupandpredictof AlphaFold 2, AlphaFold 3 and AlphaLink now name every option they use, as does AF2'spredict_individual_job. Options meant for other backends arrive as**other_backends_optionsand go only tovalidate_model_configuration, which rejects any that no backend takes.num_seeds,num_diffusion_samples,num_recycles, the embedding and distogram switches) instead of itskwargs.af3_input_json: nothing supplied it, andprepare_inputignores it.Tests
test_inference_flagsreads the three backends' signatures from source, since AF2 and AF3 cannot be imported together. It checks three things:Mutation-checked: a mistyped key in the table, a mistyped AF3
predictparameter, and an option read back with.geteach fail it.predictof both AlphaFold backends accepts other backends' options and reports a mistyped one.Unit + integration, both release images: the same results as
mainplus 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.pyleft 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