Installation¶
OneEHR requires Python 3.12+.
Quick Install (PyPI)¶
pip install oneehr
From Source¶
git clone https://github.com/MedXLab/OneEHR.git
cd OneEHR
uv venv .venv --python 3.12
uv pip install -e .
Verify The CLI¶
oneehr --help
You should see these top-level commands:
preprocess— bin features, split patientstrain— train ML/DL modelstest— evaluate on test setanalyze— cross-system comparisonplot— publication-quality figuresconvert— convert raw datasets to OneEHR format
Optional Extras¶
# Development and testing
pip install oneehr[test]
# Documentation
pip install oneehr[docs]
# Survival analysis (lifelines for fast C-index)
pip install oneehr[survival]
GPU Support¶
OneEHR uses PyTorch for deep learning models. If you have a CUDA-capable GPU, install a CUDA-enabled PyTorch build. The trainer defaults to device = "auto" and will use CUDA when available.
[trainer]
device = "auto" # auto | cpu | cuda
precision = "fp16" # fp32 | fp16 | bf16
LIME Support (Optional)¶
For LIME-based interpretability, install the lime package:
pip install lime