Skip to content

Optimize framework performance with CSV buffering, configurable valid…#4

Open
fseiffarth wants to merge 4 commits into
mainfrom
develop
Open

Optimize framework performance with CSV buffering, configurable valid…#4
fseiffarth wants to merge 4 commits into
mainfrom
develop

Conversation

@fseiffarth

Copy link
Copy Markdown
Owner

…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

fseiffarth and others added 4 commits February 7, 2026 09:21
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant