Add ClinicalJargonDataset and ClinicalJargonVerification benchmark task#941
Open
John-Carson wants to merge 4 commits intosunlabuiuc:masterfrom
Open
Add ClinicalJargonDataset and ClinicalJargonVerification benchmark task#941John-Carson wants to merge 4 commits intosunlabuiuc:masterfrom
John-Carson wants to merge 4 commits intosunlabuiuc:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new public clinical jargon benchmark dataset and an associated binary verification task, plus supporting docs, example usage, and unit tests.
Changes:
- Introduces
ClinicalJargonDatasetwith normalized MedLingo + CASI metadata and a YAML dataset config. - Adds
ClinicalJargonVerificationtask that generates paired-text binary samples over candidate expansions. - Adds a runnable Transformers example, Sphinx API docs, synthetic test resources, and unit tests.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pyhealth/datasets/clinical_jargon.py |
Implements dataset normalization and (currently automatic) remote asset fetching. |
pyhealth/datasets/configs/clinical_jargon.yaml |
Declares the examples table schema for the dataset. |
pyhealth/datasets/__init__.py |
Exposes ClinicalJargonDataset at package import level. |
pyhealth/tasks/clinical_jargon_verification.py |
Implements the candidate-verification task and sample generation. |
pyhealth/tasks/__init__.py |
Exposes ClinicalJargonVerification at package import level. |
examples/clinical_jargon_clinical_jargon_verification_transformers.py |
Demonstrates training/evaluating a Transformers model on the task. |
tests/core/test_clinical_jargon.py |
Adds unit tests covering dataset/task loading and sample structure. |
test-resources/clinical_jargon/clinical_jargon_examples.csv |
Adds synthetic/demo benchmark rows used by tests/examples. |
docs/api/datasets/pyhealth.datasets.ClinicalJargonDataset.rst |
Adds Sphinx API stub for the dataset. |
docs/api/datasets.rst |
Adds dataset entry to the datasets API index. |
docs/api/tasks/pyhealth.tasks.ClinicalJargonVerification.rst |
Adds Sphinx API stub for the task. |
docs/api/tasks.rst |
Adds task entry to the tasks API index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/clinical_jargon_clinical_jargon_verification_transformers.py
Outdated
Show resolved
Hide resolved
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.
PyHealth PR Description
Summary
ClinicalJargonDatasetbacked by public MedLingo and CASI benchmark assets.ClinicalJargonVerification, a binary candidate-verification task for public clinical jargon evaluation.Contributors
Contribution Type
Original Paper
Implementation Overview
ClinicalJargonDatasetdownloads and normalizes the public MedLingo and CASI assets into a PyHealth dataset.ClinicalJargonVerificationconverts each benchmark item into paired-text binary classification samples over candidate expansions.benchmark,casi_variant, andmedlingo_distractors.Files To Review
pyhealth/datasets/clinical_jargon.pypyhealth/datasets/configs/clinical_jargon.yamlpyhealth/tasks/clinical_jargon_verification.pyexamples/clinical_jargon_clinical_jargon_verification_transformers.pytests/core/test_clinical_jargon.pydocs/api/datasets/pyhealth.datasets.ClinicalJargonDataset.rstdocs/api/tasks/pyhealth.tasks.ClinicalJargonVerification.rstValidation
python3 -m unittest discover -s 598-DLH/clinical_jargon_project/tests -p 'test_*.py'PYTHONPATH=598-DLH/PyHealth python3 -m unittest 598-DLH/PyHealth/tests/core/test_clinical_jargon.pypython3 598-DLH/PyHealth/examples/clinical_jargon_clinical_jargon_verification_transformers.py --model-name hf-internal-testing/tiny-random-bert --benchmark medlingo --medlingo-distractors 1 --epochs 1 --batch-size 2