Skip to content

Add PyHealth training environments, local vLLM backend, and script ru… - #1

Closed
jhnwu3 wants to merge 1 commit into
google-research:mainfrom
jhnwu3:pyhealth-vllm-classroom
Closed

jhnwu3 wants to merge 1 commit into
google-research:mainfrom
jhnwu3:pyhealth-vllm-classroom

Conversation

@jhnwu3

@jhnwu3 jhnwu3 commented Oct 23, 2026

Copy link
Copy Markdown

…nner

  • Pluggable LLM backends (backends.py): Gemini and OpenAI-compatible servers (vLLM), selectable per student; google-genai is now an optional extra. Non-retryable API errors (e.g. context overflow) end the student's attempt instead of crashing the run; Qwen-style reasoning blocks are stripped.
  • TaskEnvironment seam (environments.py) threaded through the learning cycle and final evaluation; the upstream DataFrame path is unchanged.
  • PyHealth environments (pyhealth_env/): students write solution(train_dataset, val_dataset, device) -> model; each attempt trains in a fresh subprocess on a GPU slot (GpuPool) and is scored on a held-out patient-level split. Built-in MIMIC-III/IV and eICU specs, reuse of cached SampleDatasets, prompts with a real-batch schema table plus PyHealth Trainer and custom BaseModel templates.
  • Headless runner (scripts/run_classroom.py, run.py, configs/): YAML configs with dotted overrides; notebook/Colab/Plotly code removed.
  • pyproject: repro extra pinning the classroom env used for reported results, separate vllm-server extra, explicit package discovery.
  • README: two-env setup, install pitfalls, vLLM recipes for RTX 2080 Ti and A6000, and reference MIMIC-IV mortality results (Qwen3.5-9B-AWQ students: test AUROC 0.785-0.792 vs 0.781 for the PyHealth RNN baseline).

…nner

- Pluggable LLM backends (backends.py): Gemini and OpenAI-compatible servers
  (vLLM), selectable per student; google-genai is now an optional extra.
  Non-retryable API errors (e.g. context overflow) end the student's attempt
  instead of crashing the run; Qwen-style reasoning blocks are stripped.
- TaskEnvironment seam (environments.py) threaded through the learning cycle
  and final evaluation; the upstream DataFrame path is unchanged.
- PyHealth environments (pyhealth_env/): students write
  solution(train_dataset, val_dataset, device) -> model; each attempt trains in
  a fresh subprocess on a GPU slot (GpuPool) and is scored on a held-out
  patient-level split. Built-in MIMIC-III/IV and eICU specs, reuse of cached
  SampleDatasets, prompts with a real-batch schema table plus PyHealth
  Trainer and custom BaseModel templates.
- Headless runner (scripts/run_classroom.py, run.py, configs/): YAML configs
  with dotted overrides; notebook/Colab/Plotly code removed.
- pyproject: repro extra pinning the classroom env used for reported results,
  separate vllm-server extra, explicit package discovery.
- README: two-env setup, install pitfalls, vLLM recipes for RTX 2080 Ti and
  A6000, and reference MIMIC-IV mortality results (Qwen3.5-9B-AWQ students:
  test AUROC 0.785-0.792 vs 0.781 for the PyHealth RNN baseline).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhnwu3 jhnwu3 closed this Oct 23, 2026
@google-cla

google-cla Bot commented Oct 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

1 participant