Sync tutorial notebooks with Colab and link example code in docs - #1256
Merged
Merged
Conversation
This was referenced Oct 1, 2026
- Sync tutorial_pyhealth_{data,trainer,medcode}.ipynb with the Colab
versions linked from docs/tutorials.rst. The repo copies of data and
trainer still used dataset.patients, which BaseDataset no longer has
(it is unique_patient_ids). The medcode notebook's ICD9CM->ICD10CM
cell relies on the icd-mappings backend added in the parent commits.
- docs/tutorials.rst: link each Colab tutorial to its source notebook,
turn every example filename into a link to the real file (fixing
wrong or renamed paths such as the EEG SparcNet and eICU scripts),
fix the broken readmission list-table, and blob/main -> blob/master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jhnwu3
force-pushed
the
fix/tutorials-medcode-crossmap
branch
from
October 1, 2026 20:55
20d26c3 to
3b4e3fc
Compare
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.
Summary
The repo copies of the tutorial notebooks had drifted from the Colab versions linked in
docs/tutorials.rst. The docs also referred to example files by bare names, several of which were wrong.Changes
tutorial_pyhealth_medcode.ipynb: now matches the Colab version (Drive1Tw1AUS53fotH1EYr4Abp7qYN3zDBeUbC), with outputs stripped. ItsCrossMap.load("ICD9CM", "ICD10CM")cell needs theicd-mappingsbackend from medcode: ICD-9 <-> ICD-10 translation and grouper vocabularies via icd-mappings #1257; on master it fails withHTTP Error 404.tutorial_pyhealth_data.ipynb,tutorial_pyhealth_trainer.ipynb: synced with Colab. The repo copies still calleddataset.patients;BaseDatasetnow exposesunique_patient_ids.docs/tutorials.rst:[Source]link to its notebook inexamples/tutorials/.EEG_events_SparcNet.py→eeg/eeg_models/SparcNet_eeg_events_classification.py,drug_recommendation_eICU_transformer.py→…_eicu_…, andsleep_staging_*→eeg/sleep_staging/.list-tableis fixed; it wasn't rendering because of a one-space indent.blob/main→blob/master.Earlier revisions of this PR also changed
CrossMapand rewrote the medcode ICD-9 → ICD-10 cell. Those changes are dropped: the clearer missing-table error now lives in #1257, and the Colab cell is correct once #1257 lands.Testing
!pip; all pass.blob/master/examples/…link intutorials.rstresolves to a file that exists.🤖 Generated with Claude Code