Skip to content

fix: remove deprecated code_mapping, dev, refresh_cache from examples and README#935

Open
haoyu-haoyu wants to merge 1 commit intosunlabuiuc:masterfrom
haoyu-haoyu:fix/deprecated-code-mapping
Open

fix: remove deprecated code_mapping, dev, refresh_cache from examples and README#935
haoyu-haoyu wants to merge 1 commit intosunlabuiuc:masterfrom
haoyu-haoyu:fix/deprecated-code-mapping

Conversation

@haoyu-haoyu
Copy link
Copy Markdown
Contributor

Summary

Remove references to deprecated code_mapping, dev, and refresh_cache parameters from example scripts and README. These parameters belonged to the legacy BaseEHRDataset API and are no longer accepted by the v2.0 MIMIC3Dataset/MIMIC4Dataset (based on BaseDataset).

Files updated

File Change
README.rst Remove code_mapping={"NDC": "CCSCM"} from quickstart example
examples/mortality_prediction/mortality_mimic3_grasp.py Remove code_mapping, dev, refresh_cache
examples/drug_recommendation/drug_recommendation_mimic4_gamenet.py Remove code_mapping, dev, refresh_cache
examples/patient_linkage_mimic3_medlink.py Remove code_mapping, dev, refresh_cache
leaderboard/utils.py Remove code_mapping, dev, refresh_cache from MIMIC3/MIMIC4 loaders

Out of scope (for follow-up PRs)

  • Task file docstrings (pyhealth/tasks/*.py) — these contain code_mapping in >>> doctest examples that also need updating
  • pyhealth/datasets/mimicextract.py — still uses the legacy API (not yet migrated to v2.0)
  • chat-assistant/corpus/ — auto-generated text corpus, will update when source docs are fixed

Fixes #535

The v2.0 MIMIC3Dataset/MIMIC4Dataset (based on BaseDataset) no longer
accepts code_mapping, dev, or refresh_cache parameters. These were
part of the legacy BaseEHRDataset API.

Update README.rst, example scripts, and leaderboard utilities to use
the current v2.0 API.

Note: task file docstrings and pyhealth/datasets/mimicextract.py
still reference code_mapping but are left for separate PRs since
mimicextract.py has not yet been migrated to v2.0.

Fixes sunlabuiuc#535
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.

Example code still uses deprecated argument "code_mapping"

1 participant