Skip to content

Fix broken example scripts and fairness metrics import - #1200

Merged
jhnwu3 merged 1 commit into
sunlabuiuc:masterfrom
lehendo:examplesfix
Sep 2, 2026
Merged

Fix broken example scripts and fairness metrics import#1200
jhnwu3 merged 1 commit into
sunlabuiuc:masterfrom
lehendo:examplesfix

Conversation

@lehendo

@lehendo lehendo commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator
  • Re-enable fairness_metrics_fn import in pyhealth.metrics (was commented out); add it to all
  • Fix SyntaxError in examples/benchmark_perf/loc/minimal_los.py from a concatenated def/class statement
  • Fix readmission_mimic3_fairness.py: add missing main guard (was hanging under multiprocessing), update Transformer(...) call to the current dataset-only constructor API, and fix the wrong label key
  • Fix sensitive_attributes_from_patient_ids to use the current get_patient()/event-based demographics API instead of the removed dataset.patients attribute; add a verified doctest

- Re-enable fairness_metrics_fn import in pyhealth.metrics (was
  commented out); add it to __all__.
- Fix SyntaxError in examples/benchmark_perf/loc/minimal_los.py from a
  concatenated def/class statement.
- Fix readmission_mimic3_fairness.py: add missing __main__ guard
  (was hanging under multiprocessing), update Transformer(...) call to
  the current dataset-only constructor API, and fix the wrong label
  key.
- Fix sensitive_attributes_from_patient_ids to use the current
  get_patient()/event-based demographics API instead of the removed
  dataset.patients attribute; add a verified doctest.

@lehendo lehendo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@fbonc

fbonc commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Looks good

@jhnwu3 jhnwu3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jhnwu3
jhnwu3 merged commit 6541adc into sunlabuiuc:master Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants