Repository navigation
Reduce memory of summarize step by dropping unused variables before wide merge - #1125
Open
i-am-sijia wants to merge 3 commits into
Open
i-am-sijia wants to merge 3 commits into
i-am-sijia wants to merge 3 commits into
Conversation
This branch has not been deployed
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 #1124.
This pull request introduces a new feature to the
summarizemodel that trims unused columns from tables before merging, improving memory usage and performance. It also adds a corresponding test to ensure this behavior works as intended. The most important changes are grouped below:Core feature: Trimming unused columns
trim_unused_columnstosummarize.pythat drops columns from input tables that are not referenced in the summarize specification or related preprocessor specs, with logic to retain necessary columns for merging and aggregation.DROP_UNUSED_COLUMNS(defaultTrue) inSummarizeSettingsto control whether unused columns are dropped, with logic to skip trimming ifEXPORT_PIPELINE_TABLESisTrue.trim_unused_columnsinto the mainsummarizefunction so that tables are trimmed before merging, based on the new setting.Refactoring and utility
delete_temporary_variablesfor clarity and reuse.Testing
test_summarize_drop_unused_columnsto verify that columns are correctly trimmed when the feature is enabled, and that the output remains correct and consistent.