Skip to content

fix: validate layer names before extraction and name the missing input column - #214

Merged
KartikP merged 4 commits into
unified-model-interface-v2from
fix/newuser-onboarding
Nov 5, 2026
Merged

KartikP merged 4 commits into
unified-model-interface-v2from
fix/newuser-onboarding

Conversation

@KartikP

@KartikP KartikP commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Core half of the new-user onboarding fixes. Paired with KartikP/brainscore-unified#73 (description, examples) and brain-score/vision#2638.

  • region_layer_map layers are checked when BrainScoreModel is built, and raw start_recording targets when recording starts, against the routed extractor's optional layer_names(). A missing layer raises ValueError with close matches before any forward pass. Extractors that do not declare layer_names() skip the check.
  • An unmapped name that is also not a layer raises instead of warning; a declared raw layer path records without a warning.
  • Extractor protocol documents the optional layer_names().
  • The no-input-column error names the column to add and lists the columns this model reads.

umi-v2.yml points at unified f03ca78, which pins this branch's c8cda87 and vision 89dfca1.

Tests: core 1205 passed; the remaining 1 failure (test_conda_score, exit 127) and 7 errors (test_plugin_management/test_test_plugins.py, test_submission/test_endpoints.py) also occur on unified-model-interface-v2 locally.

@KartikP
KartikP merged commit bab8202 into unified-model-interface-v2 Nov 5, 2026
9 checks passed
KartikP added a commit to brain-score/vision that referenced this pull request Nov 5, 2026
Vision half of the new-user onboarding fixes. Paired with
KartikP/brainscore-unified#73 (description, examples) and
brain-score/core#214.

- `ActivationsExtractorHelper` reads image paths from an `image_path`
column when a stimulus set has no `stimulus_paths` (sets built from a
table). Packaged sets keep the `stimulus_paths` lookup. A set with
neither raises a `ValueError` naming the column to add.
- `PytorchWrapper.layer_names()` declares its recordable layers
(relative to the wrapped module, plus `logits`), used by core to
validate layer paths before any forward pass.

No model plugins are changed. `umi-v2.yml` points at unified `f03ca78`.

Tests: `tests/test_model_helpers/activations` 42 passed.
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