Skip to content

Commit 3f8198d

Browse files
huge docs update incoming
1 parent 5b0e8d8 commit 3f8198d

10 files changed

Lines changed: 649 additions & 183 deletions

docs/api/datasets.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Datasets
1616
datasets/pyhealth.datasets.OMOPDataset
1717
datasets/pyhealth.datasets.SHHSDataset
1818
datasets/pyhealth.datasets.SleepEDFDataset
19+
datasets/pyhealth.datasets.EHRShotDataset
20+
datasets/pyhealth.datasets.COVID19CXRDataset
1921
datasets/pyhealth.datasets.TUABDataset
2022
datasets/pyhealth.datasets.TUEVDataset
2123
datasets/pyhealth.datasets.splitter
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pyhealth.datasets.COVID19CXRDataset
2+
===================================
3+
4+
The COVID-19 Radiography chest X-ray dataset. Kaggle: `https://www.kaggle.com/datasets/tawsifurrahman/covid19-radiography-database <https://www.kaggle.com/datasets/tawsifurrahman/covid19-radiography-database>`_.
5+
6+
.. autoclass:: pyhealth.datasets.COVID19CXRDataset
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pyhealth.datasets.EHRShotDataset
2+
===================================
3+
4+
The EHRShot dataset. Website: `https://som-shahlab.github.io/ehrshot-website/ <https://som-shahlab.github.io/ehrshot-website/>`_.
5+
6+
.. autoclass:: pyhealth.datasets.EHRShotDataset
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
11+

docs/how_to_contribute.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ Every contribution must include two types of test cases:
162162

163163
All unit tests should be placed in the `tests/` directory following the existing structure, with 'tests/core/' for core functionality tests.
164164

165+
Writing Fast and Performant Tests
166+
---------------------------------
167+
168+
Guidelines for authoring test cases:
169+
170+
- Keep tests fast: avoid large data processing; prefer tiny, synthetic fixtures.
171+
- Place core unit tests in ``tests/core/`` and name files ``test_*.py``.
172+
- Avoid network access and external services; use local, in-memory data.
173+
- Use small configurations: minimal sample sizes, tiny models, small batch sizes, and ``epochs=1``.
174+
- Make tests deterministic: set random seeds and avoid time-based randomness.
175+
- Stub or monkeypatch heavy components (I/O, model training) when the logic under test allows.
176+
- Skip or gate any heavyweight tests behind explicit markers; by default, all tests must run quickly in CI.
177+
165178
Pull Request Guidelines
166179
=======================
167180

docs/how_to_get_started.rst

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
.. _how_to_get_started:
22

33
=====================
4-
How to Get Started with PyHealth
4+
Getting Started with PyHealth
55
=====================
66

7-
Welcome to PyHealth! This guide will help you build machine learning pipelines for healthcare tasks using PyHealth.
7+
Welcome to PyHealth! This guide will help you get up and running with healthcare AI development. PyHealth makes it easy to build, test, and deploy healthcare machine learning models with minimal code.
8+
9+
🚀 **New to PyHealth?** Start here. This guide walks you from install to first modeling.
10+
11+
Introduction `[Video] <https://www.youtube.com/watch?v=1Ir6hzU4Nro&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=1>`_
12+
--------------------------------------------------------------------------------------------------------------
13+
14+
Prefer video? Watch a short introduction to PyHealth before you start.
815

916
Installing PyHealth
1017
===================
@@ -23,7 +30,7 @@ To install the latest development version from GitHub:
2330
cd PyHealth
2431
pip install -e .
2532
26-
Ensure you have the required dependencies installed before proceeding.
33+
Ensure you have the required dependencies installed before proceeding. See :doc:`install` for detailed installation instructions.
2734

2835
Overview of ML Pipelines
2936
=========================
@@ -127,4 +134,31 @@ Example:
127134
from pyhealth.metrics.binary import binary_metrics_fn
128135
129136
y_true, y_prob, loss = trainer.inference(test_loader)
130-
binary_metrics_fn(y_true, y_prob, metrics=["pr_auc", "roc_auc"])
137+
binary_metrics_fn(y_true, y_prob, metrics=["pr_auc", "roc_auc"])
138+
139+
Essential Guides
140+
================
141+
142+
Now that you understand the basics, dive deeper into PyHealth's capabilities:
143+
144+
📚 **Core Guides**
145+
------------------
146+
147+
- :doc:`why_pyhealth` - Discover why PyHealth is the best choice for healthcare AI
148+
- :doc:`medical_standards` - Learn how to translate between medical coding systems (ICD, CPT, NDC, ATC)
149+
- :doc:`why_pyhealth` - Discover why PyHealth is the best choice for healthcare AI
150+
151+
🛠️ **Advanced Topics**
152+
----------------------
153+
154+
- :doc:`tutorials` - Interactive Jupyter notebooks with real examples
155+
- :doc:`api/models` - Complete documentation of all available models
156+
- :doc:`api/datasets` - Working with healthcare datasets
157+
- :doc:`api/tasks` - Defining custom healthcare prediction tasks
158+
159+
🤝 **Community & Support**
160+
--------------------------
161+
162+
- :doc:`how_to_contribute` - Join our community of healthcare AI developers
163+
- :doc:`faq` - Frequently asked questions and troubleshooting
164+
- `Discord Community <https://discord.gg/mpb835EHaX>`_ - Chat with other users and developers

docs/index.rst

Lines changed: 75 additions & 166 deletions
Large diffs are not rendered by default.

docs/install.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
Installation
22
============
33

4-
You could install from PyPi:
4+
You could install from PyPi for the older stable version of PyHealth:
55

66
.. code-block:: bash
77
88
pip install pyhealth
99
1010
11-
or from github source:
11+
or from github source for the latest version of PyHealth:
1212

1313
.. code-block:: bash
1414
1515
git clone https://github.com/sunlabuiuc/PyHealth.git
1616
cd pyhealth
17-
pip install .
17+
pip install -e .
1818
1919
20-
**Required Dependencies**\ :
20+
.. **Required Dependencies**\ :
2121
22-
.. code-block:: bash
22+
.. .. code-block:: bash
2323
24-
python>=3.8
25-
torch>=1.8.0
26-
rdkit>=2022.03.4
27-
scikit-learn>=0.24.2
28-
networkx>=2.6.3
29-
pandas>=1.3.2
30-
tqdm
24+
.. python>=3.8
25+
.. torch>=1.8.0
26+
.. rdkit>=2022.03.4
27+
.. scikit-learn>=0.24.2
28+
.. networkx>=2.6.3
29+
.. pandas>=1.3.2
30+
.. tqdm
3131
3232
**Warning 1**\ :
3333

@@ -38,9 +38,11 @@ If you want to use neural-net based models, please make sure PyTorch is installe
3838
Similarly, models depending on **xgboost** would **NOT** enforce xgboost installation by default.
3939

4040

41+
42+
4143
**CUDA Setting**\ :
4244

43-
To run PyHealth, you also need CUDA and cudatoolkit that support your GPU well. `More info <https://developer.nvidia.com/cuda-gpus/>`_
45+
To run PyHealth, you may also need CUDA and cudatoolkit that supports your GPU. `More info <https://developer.nvidia.com/cuda-gpus/>`_
4446

4547
For example, if you use NVIDIA RTX A6000 as your GPU for training, you should install a compatible cudatoolkit using:
4648

0 commit comments

Comments
 (0)