Skip to content

Sign protein binder design workflow - #56

Open
ohadmo wants to merge 9 commits into
mainfrom
omosafi/pbd-workflow
Open

ohadmo wants to merge 9 commits into
mainfrom
omosafi/pbd-workflow

Conversation

@ohadmo

@ohadmo ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge; the four earlier findings remain non-blocking.

Findings

  1. P2 Unneeded scores block recovery ▶
  2. P2 Saved complex references change ▶
  3. P2 Wrong reports still pass ▶
  4. P2 Filtering repeats full-list searches ▶

Summary

This PR prepares the protein binder workflow for signing and individual skill checks. It adds offline recovery helpers, evaluation fixtures, tests, and clearer campaign instructions.

Since the previous review:

  • Binder campaigns keep target details, score rules, and ranked results together.
  • Saved campaign results can be recovered without rerunning inference.
  • Synthetic evaluations check campaign outputs and offline evidence handling.
  • The toolkit catalogs and checks the binder skill from its dedicated skill directory.

No new actionable issues were found in these changes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Load saved campaign] --> B{Required scores complete?}
  B -->|Yes| C[Keep saved scores]
  B -->|No| D[Check cached response and recorded hashes]
  D -->|Match| E[Recover missing scores]
  D -->|Missing or mismatch| F[Keep candidate blocked]
  C --> G[Apply filters and save]
  E --> G
  F --> G
  G --> H[Export full audit and ranked designs]
Loading

Reviews (9) · Last reviewed commit: "report judge refusals and diagnose inval..." · Reviewed by Greptile

Comment on lines +149 to +155
scores["binder_plddt"] = binder_plddt(
text,
format,
binding["binder_chain"],
len(candidate["sequence"]),
binding["plddt_scale"],
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unneeded scores block recovery

extract_scores() always reads binder pLDDT, even when it is already saved or its filter is disabled. For a candidate missing only RMSD, unusable confidence values in the cached structure block recovery even though its coordinates can supply the missing score. Extract only the missing metrics, while keeping the chain and digest checks.

Comment on lines +212 to +214
candidate.setdefault("artifacts", {})["complex"] = str(
path.relative_to(output_dir)
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Saved complex references change

Recovery replaces an existing artifacts.complex reference whenever it fills a missing score. An interrupted run can already have a saved complex but lack RMSD. This changes its recorded path despite the contract to preserve existing artifacts, and the new grader rejects that change. Keep existing references and record the recovered structure separately when needed.

Comment on lines +317 to +337
verify_run(
path,
source,
profile["candidates"],
ranked,
lambda ok, msg: checks.append((ok, msg)),
)
except (OSError, ValueError, KeyError, TypeError) as exc:
checks.append((False, f"{path}: {type(exc).__name__}: {exc}"))
attempts.append(checks)
valid = next((a for a in attempts if a and all(ok for ok, _ in a)), None)
chosen = (
valid
if valid is not None
else (
max(attempts, key=lambda a: sum(ok for ok, _ in a)) if attempts else []
)
)
check(bool(chosen), f"{profile['name']}: output manifest found")
for ok, msg in chosen:
check(ok, msg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Wrong reports still pass

The four bookkeeping cases never check reported counts or missing-score disclosures. verify_bookkeeping() checks the manifest and CSVs without reading summary.json or checking saved summary fields. Correct tables can earn artifact_correctness=1 alongside wrong counts or a falsely complete passing fraction. Add checks for these results and tests that corrupt them.

and s.get("self_consistency_rmsd") is not None
):
checks.append(s["self_consistency_rmsd"] <= f["self_consistency_rmsd_max"])
required = self.required_metrics(c["id"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Filtering repeats full-list searches

apply_filters() now searches the full candidate list for every candidate through required_metrics() and _find(). Doubling the campaign size roughly quadruples that search work. export_run() repeats the searches when collecting missing scores. Pass the candidate already in hand to an internal helper, or build an ID lookup once.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

1 similar comment
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

1 similar comment
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

@ohadmo

ohadmo commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

1 similar comment
@ohadmo

ohadmo commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

Signed-off-by: Ohad Mosafi <omosafi@nvidia.com>
@ohadmo

ohadmo commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

/nvskills-ci

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