Refactor featurization logic and cache seed-independent inputs#679
Open
y1zhou wants to merge 4 commits into
Open
Refactor featurization logic and cache seed-independent inputs#679y1zhou wants to merge 4 commits into
y1zhou wants to merge 4 commits into
Conversation
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.
This PR addresses #675 by refactoring
WholePdbPipeline.process_structure, moving features that do not depend on the input random seed into a separate@lru_cacheed function_process_structure_seed_independent(). A simple test for validating cache hits was also added.We have tested the code on the same test 872 token case in #675. The generated structures have ~0.0 RMSD before/after this patch. The featurization time for the first seed is about 1s slower (10s -> 11s), but for subsequent seeds the time drops from ~11s to 3-4s.
AI usage disclosure
The initial refactoring was discussed and partly implemented by Codex. I have manually reviewed the code, made edits to reduce the verbosity, and tested for correctness as mentioned above.