ESMFold Backend Inference and Tensor Extraction (Issue #43)#54
Open
rohan5986 wants to merge 8 commits into
Open
ESMFold Backend Inference and Tensor Extraction (Issue #43)#54rohan5986 wants to merge 8 commits into
rohan5986 wants to merge 8 commits into
Conversation
|
notes for Rohan PR: good stuff, you got the right module path for HF and the / slicing was a key insight. it should already in the backend now. the outputs.s_s extraction is unique to this PR and would be really useful to add on top of our work. once Jeeva is done with his changes, if you want to add that you can PR against feature/esmfold-backend. the web app could be a separate follow-up too |
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.
Related Issue: Contributes to #43
Context & Objective
As discussed, this PR serves as an initial prototype for the backend inference and tracing pipeline required to integrate ESMFold into VizFold. It successfully handles the heavy ML infrastructure tasks—specifically running the forward pass and extracting the required hidden states, attention maps, and predicted structures into a standardized archive format.
Key Changes & Implementations
extract_esmfold.py): Implemented model loading using the Hugging Facetransformerslibrary (EsmForProteinFolding).safetensorsenforcement to bypass HPC cluster disk quota limitations and recent PyTorchtorch.loadsecurity blocks.format_vizfold.py): Wrote a formatter to clean the raw PyTorch tensors and convert them to NumPy arrays.<cls>and<eos>padding tokens from the stem's attention maps to ensure sequence length alignment..pklarchive.