-
Notifications
You must be signed in to change notification settings - Fork 9
perf: reduce memory usage in build_model (sparse coefficients + per-effect share constraints) #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
FBumann
merged 16 commits into
feature/element-data-classes
from
feature/element-data-classes+memmory-issues
Feb 1, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f6a580b
fix: memory issues due to dense large coeficients
FBumann 5e6c8be
fix(effects): avoid massive memory allocation in share variable creation
FBumann 032d4ea
Switch to per contributor constraints to solve memmory issues
FBumann a9c2e22
fix(effects): avoid massive memory allocation in share variable creation
FBumann cdc2da9
Switch to per contributor constraints to solve memmory issues
FBumann a1d57a2
perf: improve bus balance to be more memmory efficient
FBumann 76442c7
Switch to per effect shares
FBumann 00f92c1
Firs succesfull drop to 10 GB
FBumann 3a61f5b
Make more readable
FBumann 0ef2a02
Go back to one variable for all shares
FBumann e640104
⏺ Instead of adding zero-constraints for uncovered combos, we should …
FBumann 6e933af
Only create variables needed
FBumann 327de3e
_create_share_var went from 1,674ms → 116ms — a 14x speedup! The rein…
FBumann 47711f8
Revert
FBumann b30f8c3
Revert
FBumann 35af3d2
1. effects.py: add_temporal_contribution and add_periodic_contribut…
FBumann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataArray contributions must carry an
effectdimension.If a DataArray comes in without
effectand noeffect=...is provided,finalize_shares()later calls.reindex({'effect': ...}), which will error. This can happen for single‑effect constants (e.g., mandatory/retirement contributions). Enforce the requirement or expand with the intended effect to avoid runtime failures.🛠️ Enforce effect presence
🤖 Prompt for AI Agents