Skip to content

Save subcohort reports instead of rebuilding them on every run - #297

Merged
ha-my-bui merged 4 commits into
mainfrom
feature/subcohort-reporter
Oct 15, 2026
Merged

ha-my-bui merged 4 commits into
mainfrom
feature/subcohort-reporter

Conversation

@ha-my-bui

Copy link
Copy Markdown
Collaborator

A subcohort never saved its reports. Waterfalls, Table1s and custom reporters were built in memory at the end of execute(), written to the run folder and thrown away, and subcohort.table1 recomputed on every read. Every re-run rebuilt all of them, even when nothing had changed. Now subcohort reports become saved nodes, like the parent cohort's. They are written to the destination database at the end of execute() and read back when the definition has not changed, and they run in parallel on n_threads. Changes:

  • a shared study-level reporter is stamped with the node it ran for, so a cached cohort no longer writes another cohort's numbers
  • Table1 histograms are saved with the report, so a cached Table1 keeps them
  • a cached custom reporter runs again before drawing HTML or PNG, so plots have their data

@ha-my-bui ha-my-bui self-assigned this Sep 23, 2026
@ha-my-bui
ha-my-bui merged commit 525bbc0 into main Oct 15, 2026
4 checks passed
@ha-my-bui
ha-my-bui deleted the feature/subcohort-reporter branch October 15, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants