Optimize framework performance with CSV buffering, configurable valid…#4
Open
fseiffarth wants to merge 4 commits into
Open
Optimize framework performance with CSV buffering, configurable valid…#4fseiffarth wants to merge 4 commits into
fseiffarth wants to merge 4 commits into
Conversation
…ation frequency, and improved file operations - Replace OS-specific commands with shutil.copy2 for cross-platform file copying - Add CSV buffering mechanism to reduce I/O operations (flush every 50 writes) - Add configurable validation frequency to skip validation on some epochs - Optimize eval/train mode switching to avoid redundant calls - Make evaluation batch size configurable (default 512) - Remove redundant self.net.train(False) call in evaluation loop Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**Performance optimizations:** - Replace torch.nn.Dropout() with torch.nn.functional.dropout() in all MPNN layers for better performance - Optimize ShareGNN weight distribution using chunks instead of preallocated tensors - Remove redundant code and unused variables (representation_list, n_heads_per_label, num field) - Simplify num_heads calculation in framework_layer **Security fixes:** - Replace unsafe eval() with ACTIVATION_MAP dictionary for activation functions - Replace eval() with ast.literal_eval() in ShareGNN preprocessing **Code quality improvements:** - Fix inconsistent return patterns in model layer creation - Remove unused pandas import in inv_based_pooling - Fix property_dict bug in ShareGNN utils - Remove redundant out_features initialization in share_gnn_linear - Improve variable naming consistency in layer_loader (head → heads) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…and improve weight distribution logic TODO fix inv_based_message_passing.py
…ve weight distribution logic
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.
…ation frequency, and improved file operations