Reduce runtime#21
Open
AuroraJohansen wants to merge 14 commits into
Open
Conversation
…igurable extra metrics Previously, results_df_base_columns included current extra metrics (e.g. VOI), causing them to be filtered out when building all_extra_metric_names and missing from the fold average CSV files. Introduced results_df_fixed_columns to represent only the non-configurable base columns, used for filtering.
…cation, fixing extra metrics computation [skip ci]
dbouget
marked this pull request as ready for review
July 3, 2026 09:29
dbouget
self-requested a review
July 3, 2026 09:30
dbouget
approved these changes
Jul 3, 2026
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.
Changes
Refactor kfold_model_validation to use SQLite as primary data store
Previously, all metrics were stored in pandas DataFrames and written to CSV after each patient, causing O(n²) slowdown for large cohorts (e.g. patient 2400 took significantly longer than patient 1).
Key changes:
Fix early-exit logic in compute_patient_extra_metrics to correctly skip already-computed metrics
The original early-exit check had two bugs:
x == xto detect computed values, which evaluates to True for None (since None == None is True in Python), causing the function to return early with None values instead of recomputing them.The new implementation:
v is not None and v == v