Skip to content

contacts_v1: make the pairwise readout and metric helpers public - #360

Open
jsilter wants to merge 1 commit into
Open-Athena:mainfrom
jsilter:exp341/public-readout
Open

jsilter wants to merge 1 commit into
Open-Athena:mainfrom
jsilter:exp341/public-readout

Conversation

@jsilter

@jsilter jsilter commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Drops the leading underscore from seven helpers in marinfold/marinfold/document_structures/contacts_v1/inference.py so experiments can import them as public API:

  • prefix_and_positions, fwd_matrix, pcontact_from_fwd, pcontact_matrix, pairwise_score_matrix (the pairwise P(contact) readout)
  • gt_contact_matrix, metric_rows (ground-truth matrix and per-range precision/AUC)

_sym_from_fwd stays private; only the rollout tie-break uses it.

No behaviour change. Callers in inference.py and tests/document_structures/contacts_v1/test_inference.py are updated; uv run pytest tests/document_structures/contacts_v1/ passes (253 passed, 4 skipped).

Why: exp341 (#341) builds an interpretability harness whose metric is this readout, and its research plan (section 4.5) calls for promoting these names rather than importing private helpers from an experiment.

Not updated: exp159 still imports the underscored names, but its pyproject.toml pins marinfold to the exp159-backtracking-corpus git branch, so this change does not reach it.

🤖 Generated with Claude Code

Rename prefix_and_positions, fwd_matrix, pcontact_from_fwd,
pcontact_matrix, pairwise_score_matrix, gt_contact_matrix and
metric_rows to drop the leading underscore, so experiments (exp341's
interpretability harness first) can import them without reaching into
private helpers. No behaviour change.

exp159 still imports the underscored names, but it pins marinfold to
its own git branch (exp159-backtracking-corpus), so it is unaffected.

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

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T12:39:05.535443Z 4164ccf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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