{"id":34095024,"url":"https://github.com/corazonlabs/lemonpie","last_synced_at":"2026-04-07T11:31:53.357Z","repository":{"id":39870209,"uuid":"316083954","full_name":"corazonlabs/lemonpie","owner":"corazonlabs","description":"A deep learning library for Electronic Health Record (EHR) data","archived":false,"fork":false,"pushed_at":"2023-04-12T05:18:48.000Z","size":19478,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T18:53:22.544Z","etag":null,"topics":["deep-learning","ehr","fastai","fhir","health-data","healthcare","nbdev","pytorch","synthea"],"latest_commit_sha":null,"homepage":"https://corazonlabs.github.io/lemonpie/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corazonlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-26T00:27:38.000Z","updated_at":"2024-06-01T14:50:53.000Z","dependencies_parsed_at":"2023-02-16T14:15:51.468Z","dependency_job_id":null,"html_url":"https://github.com/corazonlabs/lemonpie","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"fastai/nbdev_template","purl":"pkg:github/corazonlabs/lemonpie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corazonlabs%2Flemonpie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corazonlabs%2Flemonpie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corazonlabs%2Flemonpie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corazonlabs%2Flemonpie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corazonlabs","download_url":"https://codeload.github.com/corazonlabs/lemonpie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corazonlabs%2Flemonpie/sbom","scorecard":{"id":304572,"data":{"date":"2025-08-11","repo":{"name":"github.com/corazonlabs/lemonpie","commit":"a6a337e6dbb03d4762b56c6b8157f6641f1daf70"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/corazonlabs/lemonpie/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/corazonlabs/lemonpie/main.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:14","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-cr5q-6q9f-rq6q","Warn: Project is vulnerable to: GHSA-j6gc-792m-qgm2","Warn: Project is vulnerable to: GHSA-pj73-v5mw-pm9j","Warn: Project is vulnerable to: GHSA-jxhc-q857-3j6g","Warn: Project is vulnerable to: GHSA-48wp-p9qv-4j64","Warn: Project is vulnerable to: GHSA-4qw4-jpp4-8gvp","Warn: Project is vulnerable to: GHSA-636f-xm5j-pj9m","Warn: Project is vulnerable to: GHSA-7vh7-fw88-wj87","Warn: Project is vulnerable to: GHSA-fmx4-26r3-wxpf","Warn: Project is vulnerable to: GHSA-52p9-v744-mwjj","Warn: Project is vulnerable to: GHSA-286v-pcf5-25rc","Warn: Project is vulnerable to: GHSA-2qc6-mcvw-92cw","Warn: Project is vulnerable to: GHSA-2rr5-8q37-2w7h","Warn: Project is vulnerable to: GHSA-353f-x4gh-cqq8","Warn: Project is vulnerable to: GHSA-59gp-qqm7-cw4j","Warn: Project is vulnerable to: GHSA-5w6v-399v-w3cc","Warn: Project is vulnerable to: GHSA-7rrm-v45f-jp64","Warn: Project is vulnerable to: GHSA-cgx6-hpwq-fhv5","Warn: Project is vulnerable to: GHSA-crjr-9rc5-ghw8","Warn: Project is vulnerable to: GHSA-fq42-c5rg-92c2","Warn: Project is vulnerable to: GHSA-gx8x-g87m-h5q6","Warn: Project is vulnerable to: GHSA-jc36-42cf-vqwj","Warn: Project is vulnerable to: GHSA-jw9f-hh49-cvp9","Warn: Project is vulnerable to: GHSA-mrxw-mxhj-p664","Warn: Project is vulnerable to: GHSA-pxvg-2qj5-37jq","Warn: Project is vulnerable to: GHSA-r95h-9x8f-r3f7","Warn: Project is vulnerable to: GHSA-v4f8-2847-rwm7","Warn: Project is vulnerable to: GHSA-v6gp-9mmm-c6p5","Warn: Project is vulnerable to: GHSA-vr8q-g5c7-m54m","Warn: Project is vulnerable to: GHSA-vvfq-8hwr-qm4m","Warn: Project is vulnerable to: GHSA-xc9x-jj77-9p9j","Warn: Project is vulnerable to: GHSA-xh29-r2w5-wx8m","Warn: Project is vulnerable to: GHSA-xxx9-3xcr-gjj3","Warn: Project is vulnerable to: GHSA-2rxp-v6pw-ch6m","Warn: Project is vulnerable to: GHSA-4xqq-m2hx-25v8","Warn: Project is vulnerable to: GHSA-5866-49gr-22v4","Warn: Project is vulnerable to: GHSA-8cr8-4vfw-mr7h","Warn: Project is vulnerable to: GHSA-r55c-59qm-vjw6","Warn: Project is vulnerable to: GHSA-vg3r-rm7w-2xgh","Warn: Project is vulnerable to: GHSA-vmwr-mc7x-5vc3","Warn: Project is vulnerable to: GHSA-5cm2-9h8c-rvfx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T21:42:18.390Z","repository_id":39870209,"created_at":"2025-08-17T21:42:18.390Z","updated_at":"2025-08-17T21:42:18.390Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31511582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","ehr","fastai","fhir","health-data","healthcare","nbdev","pytorch","synthea"],"created_at":"2025-12-14T15:07:33.563Z","updated_at":"2026-04-07T11:31:53.350Z","avatar_url":"https://github.com/corazonlabs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lemonpie\n\u003e An open source deep learning library for Electronic Health Record (EHR) data.\n\n\nIn this initial release of the library ..\n- it implements 2 deep learning models (an LSTM and a CNN) based on popular papers \n- that can be trained on synthetic EHR data, created using the open source [Synthea Patient Generator](https://github.com/synthetichealth/synthea/wiki)\n- to predict conditions that are on the [CDC's list of top chronic diseases](https://www.cdc.gov/chronicdisease/about/costs/index.htm) that contribute most to healthcare costs\n    - and is easily configurable to train on and predict any conditions in the dataset\n\nThe end goal is to \n- keep adding more model implementations \n- keep adding different publicly available datasets \n- and have a leaderboard to track which models and configurations work best on these datasets\n\n## Install\n\nWith conda\n- `conda install -c corazonlabs -c fastai -c conda-forge lemonpie`\n\nWith pip\n- `pip install lemonpie`\n\nOr ..\n1. Git clone the repo\n    - `https://github.com/corazonlabs/lemonpie.git`\n2. Create a new conda env using the `environment.yml` file\n    - `cd lemonpie`\n    - `conda env create --name lemonpie --file environment.yml`\n\n## How to use\n\n1. Read through and then run the following **Quick Start** guides to get a general idea. \n    - if using the cloned repo, run these noteboooks \n        - `99_quick_walkthru.ipynb`\n        - `99_running_exps.ipynb`\n    - if using installed lib, just open a jupyter notebook and copy, paste \u0026 run cell-by-cell from these guides\n        - [Quick Walkthrough](https://corazonlabs.github.io/lemonpie/quick_walkthru.html) \n        - [Running Experiments](https://corazonlabs.github.io/lemonpie/running_exps.html) \n2. Setup Synthea\n    - Refer to [condensed instructions](https://corazonlabs.github.io/lemonpie/setup.html#Setup-Synthea)\n    - Generate different datasets you like - e.g. 1K, 5K, 10K\n3. Run experiments\n    - Refer to **Detailed Docs** for customizations\n\n## Roadmap\n- **A leader-board to track which models and configurations work best on different publicly available datasets**.\n\n\n- Callbacks, Mixed Precision, etc\n    - Either upgrade the library to use fastai v2.\n    - Or as a minimum, build functionality for fastai-style callbacks \u0026 [PyTorch AMP](https://pytorch.org/docs/stable/amp.html).\n\n- More models\n    - Pick some of the best EHR models out there and implement them.\n    - **Ideas are welcome** - please use [Github discussions](https://github.com/corazonlabs/lemonpie/discussions) for suggestions.\n- More datasets\n    - eICU and MIMIC3 possibly.\n    - **Ideas are welcome** -  [Github discussions](https://github.com/corazonlabs/lemonpie/discussions)\n- NLP on clinical notes\n    - Synthea does not have clinical notes, so this can only be done with other datasets.\n- Predicting different conditions\n    - Again different datasets will allow this - e.g. hospitalization data (length of stay, in-patient mortality), ER data, etc.\n- Integraion with Experiment management tools like W\u0026B, Comet, etc,.\n\n## Known Issues \u0026 Limitations\n\n1. `num_workers \u003e 0` not working yet, under investigation\n2. Test coverage\n    - Need to write more tests for more comprehensive coverage\n    \nLook at [Issues](https://github.com/corazonlabs/lemonpie/issues) for details about these and others.\n\n## References\n\nThis library is created using the awesome [nbdev](https://nbdev.fast.ai/)\n\nSynthea [Synthetic Patient Population Simulator](https://github.com/synthetichealth/synthea)\n\n\u003e Jason Walonoski, Mark Kramer, Joseph Nichols, Andre Quina, Chris Moesel, Dylan Hall, Carlton Duffett, Kudakwashe Dube, Thomas Gallagher, Scott McLachlan, Synthea:An approach, method, and software mechanism for generating synthetic patients and the synthetic electronic health care record, Journal of the American Medical Informatics Association, Volume 25, Issue 3, March 2018, Pages 230–238, https://doi.org/10.1093/jamia/ocx079\n\nLSTM Model *based on* this paper - [Scalable and accurate deep learning for electronic health records](http://arxiv.org/abs/1801.07860)\n\n\u003e Rajkomar, A., Oren, E., Chen, K. et al. Scalable and accurate deep learning with electronic health records. npj Digital Med 1, 18 (2018). https://doi.org/10.1038/s41746-018-0029-1\n\nCNN Model *based* on this paper - [Deepr: A Convolutional Net for Medical Records](http://arxiv.org/abs/1607.07519)\n\n\u003e Nguyen, P., Tran, T., Wickramasinghe, N., \u0026 Venkatesh, S. (2017). $\\mathtt {Deepr}$:A Convolutional Net for Medical Records. IEEE Journal of Biomedical and Health Informatics, 21, 22-30.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorazonlabs%2Flemonpie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorazonlabs%2Flemonpie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorazonlabs%2Flemonpie/lists"}