Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a normalize flag throughout embedding calculation routines, standardizes Neo4j queries to use elementId instead of id, and updates several dependencies and logging patterns.
- Adds
normalize: bool = Trueparameter to all embedding methods and propagates it through the processor and model implementations - Replaces
id(r)withelementId(r)in standard numbering and mutation detection queries - Improves logging in sequence alignment and ontology loading, and updates project dependencies
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pyeed/embeddings/processor.py | Added normalize parameter to public/legacy embedding APIs |
| src/pyeed/embeddings/models/prott5.py | Propagated normalize and pooling changes for ProtT5 |
| src/pyeed/embeddings/models/esmc.py | Added normalize flag to ESMC batch/single embedding |
| src/pyeed/embeddings/models/esm3.py | Added normalize flag to ESM3 batch/single embedding |
| src/pyeed/embeddings/models/esm2.py | Added normalize flag to ESM2 batch/single embedding |
| src/pyeed/embeddings/base.py | Updated abstract methods to include normalize parameter |
| src/pyeed/analysis/standard_numbering.py | Switched to elementId and refined logging |
| src/pyeed/analysis/sequence_alignment.py | Replaced print with logger, fixed query patterns |
| src/pyeed/analysis/ontology_loading.py | Improved OWL restriction handling and relationship logic |
| src/pyeed/analysis/mutation_detection.py | Updated region_ids_neo4j type and elementId queries |
| pyproject.toml | Removed old numpy constraint; replaced umap with umap-learn |
Comments suppressed due to low confidence (1)
src/pyeed/embeddings/models/prott5.py:145
- The variable
attention_maskis not defined in this scope. You need to obtain it from the model outputs (e.g.,outputs.attention_mask) or pass it into the method.
seq_len = attention_mask.cpu().numpy().sum()
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added small fixed in embedding and mutation and standard numbering.