-
Notifications
You must be signed in to change notification settings - Fork 36
Add support for load-time data filtering and hierarchical cohorts #160
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
Open
MahmoodEtedadi
wants to merge
43
commits into
epic-open-source:main
Choose a base branch
from
MahmoodEtedadi:improve-data-filtering
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add support for load-time data filtering and hierarchical cohorts #160
MahmoodEtedadi
wants to merge
43
commits into
epic-open-source:main
from
MahmoodEtedadi:improve-data-filtering
Conversation
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
…gracefully if min/max and values are not comparable (<)
gbowlin
requested changes
Jun 11, 2025
diehlbw
requested changes
Jun 12, 2025
…idget options as fallback
diehlbw
requested changes
Jul 2, 2025
…via sort_index() + make upper bound exclusive in FilterRange
gbowlin
reviewed
Jul 9, 2025
gbowlin
requested changes
Jul 9, 2025
gbowlin
previously approved these changes
Jul 9, 2025
diehlbw
requested changes
Jul 10, 2025
… based on count, values, range
…nd display after filtering
diehlbw
requested changes
Jul 24, 2025
diehlbw
reviewed
Aug 1, 2025
diehlbw
approved these changes
Aug 4, 2025
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.
Overview
Closes #157
Description of changes
Testing Instructions
You can use the following code to generate a parquet file with 5 columns (
h1,...,h5
) that can be used to define hierarchies and aloc
column that can be used to test high level filtering.In
config.yml
, updateprediction_path
to:Also, update
usage_config
to add:Functional Testing
Run the notebook (comment out
# sm.download_example_dataset('diabetes-v2')
in the first code cell to prevent overwriting your data)Verify that the load-time filters were applied:
sg.dataframe["age"]
contains only"[10-20)"
,"70+"
if theinclude
filter workedsg.dataframe["race"]
does not contain"Unknown"
sg.dataframe["num_medications"]
contains only values between 10 and 30 (inclusive) (or you get the result appropriate for the config). Note thatvalues
if provided takes precedence overrange
.keep_top
was applied after other filters:sg.dataframe["loc"].nunique() <= 25
Confirm that:
reflects only the values remaining after filtering.
UI Behavior
h1 → h2 → h3 → h4 → h5
) are displayed in a single row with arrowsh1
correctly updates options shown inh2
h2
updates options shown inh3
, and so on throughh5
age
,gender
) appear in the normal layout belowTool Integration
Confirm that the following tools function correctly with the filtered and structured data:
ExploreModelEvaluation
show_cohort_summaries
No errors should occur during rendering or filtering.
Update config files (cohort hierarchies and load time filters) to test various scenarios.
Performance Testing
sm.start_up
does not take too long.Author Checklist
changelog/ISSUE.TYPE.rst
files; see changelog/README.md.