Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses out of memory errors encountered when running the demo_pipeline notebook by making two memory optimizations to the featurizer:
Changes:
- Fixed syntax error in plotting.py by changing nested double quotes to single quotes in f-strings
- Optimized pivot operation in
get_caller_counts_per_regionby pre-computing distinct regions list - Added persistence to feature DataFrames before joining in
featurize_cdr_datato avoid recomputation during multiple joins
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/cider/validation_metrics/plotting.py | Fixed syntax error where double quotes were nested inside f-strings - changed to single quotes for dictionary key access |
| src/cider/featurizer/core.py | Added memory optimizations: pre-computed regions list for pivot optimization and persisted feature DataFrames before joins to prevent recomputation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
poornimaramesh
approved these changes
Feb 19, 2026
Collaborator
poornimaramesh
left a comment
There was a problem hiding this comment.
Looks good, and works. Approving. Thanks for the quick fix!
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.
Encountered out of memory error when running demo_pipeline notebook.
Made 2 main changes to
featurizer.core:get_caller_counts_per_region, pivot became heavy -- added a line to get distinct regions before running pivot.featurize_cdr_dataleft joins became heavy -- handled this withpersist()prior to left joins.Note: I still get lots of
WARN DAGScheduler: Broadcasting large task binarywarnings even after these changes. But at least for now the function works to get desired feature outputs.