Skip to content

fix(score): stamp behavior protocol from recorded measures - #443

Merged
KartikP merged 5 commits into
unified-model-interface-v2from
fix/score-protocol-from-response
Nov 10, 2026
Merged

KartikP merged 5 commits into
unified-model-interface-v2from
fix/score-protocol-from-response

Conversation

@KartikP

@KartikP KartikP commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

score() read the behavior protocol from the subject's private state, so a subject that is not a BrainScoreModel but answers by generation was stamped behavior:readout (Contract Rule 2.2).

Changes:

  • score() opens core's record_measures() around the benchmark run and passes the record to infer_score_protocol and stamp_score_metadata. The protocol and the optional attrs['measure'] come from the responses the subject returned.
  • A core without record_measures raises an ImportError that names the required revision.
  • requirements-v2.txt pins core to fdeb451 (fix(metadata): read behavior protocol from the response core#222, which adds record_measures; it also contains Added GPT-1 Huggingface Model #221).

Evidence: new tests in tests/test_preflight.py send a real behavior StreamEvent into a BufferedSession and check the stamp. Core #222 passed its full CI, including the vision, language and unified offline suites.

Open record_measures() around the benchmark run and pass the record to
infer_score_protocol and stamp_score_metadata, so the protocol and the
optional attrs['measure'] come from the returned responses (core
ad7288a), not from the subject's private state.
Requires brainscore_core with score_metadata.record_measures: core
ad7288a or later (fix/score-protocol-from-response). Older cores now
raise an ImportError that names the required revision. The test emits
a real behavior StreamEvent instead of calling note_measure.
Measures are now noted where a session accepts a response (core
fix/score-protocol-from-response), so the test responds into a
BufferedSession instead of only building the event.
Unified dd90a7b pins core fdeb451, which adds record_measures. The
pinned unified f03ca78/5dc12f6 installed an older core, so the
installed vision, language and unified tests failed with ImportError.
@KartikP

KartikP commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

retest this please

@KartikP
KartikP merged commit 3720353 into unified-model-interface-v2 Nov 10, 2026
9 checks passed
KartikP added a commit to KartikP/brainscore-unified that referenced this pull request Nov 10, 2026
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