Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(evals): add alternative loop classification scores when classifying altlocs into different types #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat(evals): add alternative loop classification scores when classifying altlocs into different types #338
Changes from all commits
c1735f7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
Uncaught
RuntimeErrorcan abort the entire batch run and lose all accumulated results.When no finite pair scores exist for a span,
_classify_selectionraisesRuntimeError. Neither_process_structure's selection loop (lines 404-419) normain()'s row loop (lines 452-462) catches this. Sinceall_rowsis only converted to a DataFrame and written to CSV after the entire input loop finishes (lines 464-466), a single problematic span in any structure will crash the whole script and discard every previously classified row — a severe regression for long batch runs over many structures/rows.Other failure modes in this same function (bad selection syntax, metric compute exceptions, missing residue keys) are handled by logging and returning
None/nanso processing continues; this new path should follow the same pattern at the call site.🛡️ Proposed fix: catch and skip instead of aborting the batch
out = _classify_selection( atom_array=atom_array, pair_arrays=pair_arrays, altloc_ids=altloc_info.altloc_ids, selection_str=selection_str, protein=protein, structure_altloc_mask=structure_altloc_mask, structure_backbone_mask=structure_backbone_mask, domain_shift_min_span=domain_shift_min_span, scorer=scoring_strategy, loop_score_threshold=loop_score_threshold, - ) + ) + except RuntimeError as e: + logger.error(f"[{protein}] skipping selection '{selection_str}': {e}") + continue if out is None: continue🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Missing space in help text produces "specificthreshold".
The two adjacent string literals concatenate without a space between "specific" and "threshold".
✏️ Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents