Skip to content

Codex/vae pyhealth2 - #1358

Open
dalloliogm wants to merge 14 commits into
sunlabuiuc:masterfrom
dalloliogm:codex/vae-pyhealth2
Open

dalloliogm wants to merge 14 commits into
sunlabuiuc:masterfrom
dalloliogm:codex/vae-pyhealth2

Conversation

@dalloliogm

Copy link
Copy Markdown
Contributor

Hello,

Almost one year ago I started contributing to the VAE bounty in PyHealth. Unfortunately, I messed up with Git and became busy with work, and time passed, so I never followed up on the review comments on my previous PR.

This is a new implementation of the bounty for PyHealth 2.0.

Contributor: Giovanni Dall’Olio

Contribution Type: Model

Description: The VAE now supports image inputs and categorical EHR code sequences. I’ve also added or updated three notebooks demonstrating synthetic image generation, ChestXray14 image modeling, and EHR sequence modeling, with explanations of potential applications.

Files to Review:

  • pyhealth/models/vae.py - VAE implementation for image and categorical sequence inputs.
  • tests/core/test_vae.py - model behavior, generation, and Trainer compatibility tests.
  • examples/cxr/vae_cxr_synthetic.ipynb - synthetic image VAE example.
  • examples/cxr/vae_cxr_chestxray14.ipynb - ChestXray14 image example.
  • examples/mortality_prediction/vae_ehr_sequences.ipynb - EHR sequence example.
  • examples/cxr/chextXray_image_generation_VAE.py - updated image VAE example.
  • docs/tutorials.rst and docs/api/models/pyhealth.models.VAE.rst - tutorial links and API documentation.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Test Coverage

Total: 74.07% (20432 / 27585 lines)

Modified file Coverage Lines
pyhealth/models/vae.py 88.29% 181 / 205

Workflow run · 56bbdec

@jhnwu3 jhnwu3 added the status: automatic The PR will go through automatic review process. label Oct 30, 2026
@jhnwu3

jhnwu3 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

/review

@github-actions github-actions Bot added status: manual Pending maintainer's review and removed status: automatic The PR will go through automatic review process. labels Oct 31, 2026
@github-actions

Copy link
Copy Markdown

AI Review

suggestion: not available
decision: human review

This PR is too large for AI review (over 300 files or 200000 diff characters), so it is labeled status: manual and needs a human review.

@dalloliogm

Copy link
Copy Markdown
Contributor Author

If the PR is too large, I can split it into two, so the AI review can take place.

The changes to the VAE class are small. Most of the new lines come from the notebooks included to describe what is a VAE and how it can be used. I could split those into a different PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: manual Pending maintainer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants