Skip to content

Reject unknown model_family; name the laser extra when prody is missing (#2484, #2483) - #212

Merged
maraxen merged 4 commits into
mainfrom
fix/261011-family-errors
Oct 12, 2026
Merged

maraxen merged 4 commits into
mainfrom
fix/261011-family-errors

Conversation

@maraxen

@maraxen maraxen commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Fixes debts #2484 and #2483.

#2484: an unknown model_family silently ran stock ProteinMPNN. A typo such as --model-family foompnn fell through _family_driver_for (it returned None for any name outside the driver table), so the run produced ProteinMPNN results under the wrong label. Valid names now live in one table in src/aminx/host/family_driver.py (STOCK_MODEL_FAMILIES, DRIVER_BACKED_FAMILY_MODULES, MODEL_FAMILIES, validate_model_family). They are enforced at:

  • RunSpecification.__post_init__ (src/aminx/run/specs.py)
  • runner resolution (_family_driver_for, src/aminx/host/runner.py)
  • src/aminx/host/prep.py, before the FAMILY_DRIVERS lookup
  • the CLI --model-family options, via typer.BadParameter

An unknown name raises ValueError, naming it and listing the valid names. The default family is unchanged.

#2483: a lasermpnn run without the laser extra failed with a bare ModuleNotFoundError('prody'). It now fails at family resolution, before featurisation, with an ImportError naming the fix: uv sync --extra laser or pip install 'aminx[laser]'.

Tests (tests/host/test_model_family_validation.py): a single source of truth; valid names resolve; an unknown name is rejected through the spec, the runner and CLI parsing and invocation; a missing prody names the extra and fails at resolution; with prody importable, no error. Run on titanix: tests/host -k "family or runner", 26 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro

maraxen and others added 3 commits October 10, 2026 20:24
…is missing (#2484, #2483)

#2484: an unknown model_family silently fell through to stock ProteinMPNN. One
table in host/family_driver.py (STOCK_MODEL_FAMILIES + DRIVER_BACKED_FAMILY_MODULES)
now defines the valid names; validate_model_family enforces it in RunSpecification
__post_init__, the runner's _family_driver_for, prep, and the CLI --model-family
option (typer BadParameter listing the valid names). The default family is unchanged.

#2483: a lasermpnn request without the laser extra died on a bare
ModuleNotFoundError('prody') inside featurize. _require_family_extra now raises an
ImportError naming the extra (uv sync --extra laser / pip install 'aminx[laser]') at
family resolution, before featurization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro
…h has no wheel -- main fails the same way)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014bjCGQZgFEE6nR8cGTMFt7
…idate_model_family (CI regressions on #2484)

The guard rejected families the codebase declares. ModelFamily (family_driver.py) is now
the one Literal, adding "membrane" (named by the temperature-default rule and by
MODEL_WEIGHTS). STOCK_MODEL_FAMILIES is derived from it minus the driver table, and
RunSpecification annotates model_family with it, so the type and the runtime guard
cannot drift.

tests/host/test_comp536_campaign_manifest.py used "ligandmpnn_v1", which no table
declares; it now uses the real family "ligandmpnn". Weight-variant names (soluble, sc,
original, ligand) are deliberately not families and stay rejected.

browser_validation_paths.json maps family_driver.py::validate_model_family to P26 (the
RunSpecification surface), so the parity inventory has no unmapped symbol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro
@maraxen

maraxen commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

Follow-up 36142c0 after CI caught a real regression: the first version's valid set {proteinmpnn, ligandmpnn, pottsmpnn, lasermpnn} rejected legitimate names. The valid set is now derived from one declared ModelFamily Literal in host/family_driver.py (also the type of RunSpecification.model_family), which adds membrane (named by the weight registry and the temperature defaults). Two choices worth a look in review: (1) ligandmpnn_v1 appears in no family table, weight registry or loader, only in three call sites in tests/host/test_comp536_campaign_manifest.py, which now use ligandmpnn; if real campaign manifests use ligandmpnn_v1, it should be added to the Literal instead. (2) weight variants (soluble, sc, original, ligand) are not families and stay rejected. Titanix: 169 passed across the five tests CI flagged plus tests/host -k 'family or runner or campaign or spec'.

…amily tables, add protonpottsmpnn)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGHJhq24fYihaMivnXNhro
@maraxen
maraxen merged commit 3373bd4 into main Oct 12, 2026
2 checks passed
@maraxen
maraxen deleted the fix/261011-family-errors branch October 12, 2026 13:14
maraxen added a commit that referenced this pull request Oct 12, 2026
…y_wave: 9/9 would grade, 135/135 PASS) (#2621)

Groups 1-4 ran sequentially on titanix at 43a7a3b (main 2acb6e7 with
PRs #212-#215, plus the zscale single_mutation fold); every cool-tier
record is completed/pass and every control failed. protonpotts_parity is
the REVISION 261012 vehicle (99 controls).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGAcqn2SwMsYoLwzgobthN
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