{"id":296634,"name":"BatteryML","description":"An Open-Source Tool for Machine Learning on Battery Degradation.","url":"https://github.com/microsoft/batteryml","last_synced_at":"2026-04-07T02:00:23.878Z","repository":{"id":191579705,"uuid":"675604959","full_name":"microsoft/BatteryML","owner":"microsoft","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-18T08:01:43.000Z","size":1976,"stargazers_count":714,"open_issues_count":10,"forks_count":176,"subscribers_count":22,"default_branch":"main","last_synced_at":"2026-04-05T01:09:57.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-07T09:57:10.000Z","updated_at":"2026-04-01T01:56:47.000Z","dependencies_parsed_at":"2023-08-30T14:16:00.320Z","dependency_job_id":"87c2952b-bca7-45fc-b2f5-6d561b67cb01","html_url":"https://github.com/microsoft/BatteryML","commit_stats":{"total_commits":59,"total_committers":12,"mean_commits":4.916666666666667,"dds":0.5932203389830508,"last_synced_commit":"2861ae3b8c79938c7fc8e6fe9986b799ca71c7dd"},"previous_names":["microsoft/batteryml"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/BatteryML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FBatteryML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FBatteryML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FBatteryML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FBatteryML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/BatteryML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FBatteryML/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31496769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"online","status_checked_at":"2026-04-07T02:00:07.164Z","response_time":105,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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"}},"owner":{"login":"microsoft","name":"Microsoft","uuid":"6154722","kind":"organization","description":"Open source projects and samples from Microsoft","email":"opensource@microsoft.com","website":"https://opensource.microsoft.com","location":"Redmond, WA","twitter":"OpenAtMicrosoft","company":null,"icon_url":"https://avatars.githubusercontent.com/u/6154722?v=4","repositories_count":7713,"last_synced_at":"2026-04-07T00:31:42.651Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/microsoft","funding_links":[],"total_stars":3844692,"followers":116709,"following":0,"created_at":"2022-11-02T16:20:12.368Z","updated_at":"2026-04-07T00:31:42.651Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft/repositories"},"packages":[],"commits":{"id":1638687,"full_name":"microsoft/batteryml","default_branch":"main","total_commits":59,"total_committers":12,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":4.916666666666667,"dds":0.5932203389830508,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-05T01:01:45.351Z","last_synced_commit":"2861ae3b8c79938c7fc8e6fe9986b799ca71c7dd","created_at":"2024-07-24T04:00:17.677Z","updated_at":"2026-04-05T01:01:00.129Z","committers":[{"name":"Han","email":"zh950713@gmail.com","login":"fingertap","count":24},{"name":"Xiaofan Gui","email":"xiaofangui@microsoft.com","login":null,"count":13},{"name":"Microsoft Open Source","email":"microsoftopensource","login":"microsoftopensource","count":5},{"name":"CompRhys","email":"rhys.goodall@outlook.com","login":"CompRhys","count":4},{"name":"gxf","email":"247172578@qq.com","login":"agiamason","count":4},{"name":"GCR-1178","email":"jiaweichen.china@gmail.com","login":"opqrst-chen","count":3},{"name":"w824449964","email":"824449964@qq.com","login":"Ruifeng-Tan","count":1},{"name":"Zander","email":"tanevitt@uw.edu","login":"tanevitt","count":1},{"name":"Yu-qi-Li","email":"95304836+Yu-qi-Li","login":"Yu-qi-Li","count":1},{"name":"Shun Zheng","email":"zhengshun999999@163.com","login":"shun-zheng","count":1},{"name":"Richard Lindenpuetz","email":"richard.lindenpuetz@siemens.com","login":"RL5656","count":1},{"name":"Han Zhang","email":"v-zhanghan@microsoft.com","login":null,"count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbatteryml/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-07T00:00:11.408Z","repositories_count":6211391,"commits_count":920230763,"contributors_count":35657144,"owners_count":1142914,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"microsoft/batteryml","html_url":"https://github.com/microsoft/batteryml","last_synced_at":"2026-01-05T05:01:03.695Z","status":"error","issues_count":36,"pull_requests_count":33,"avg_time_to_close_issue":2559989.7391304346,"avg_time_to_close_pull_request":1075906.7666666666,"issues_closed_count":23,"pull_requests_closed_count":30,"pull_request_authors_count":14,"issue_authors_count":30,"avg_comments_per_issue":1.8888888888888888,"avg_comments_per_pull_request":0.9393939393939394,"merged_pull_requests_count":22,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":7,"past_year_pull_requests_count":8,"past_year_avg_time_to_close_issue":1380398.0,"past_year_avg_time_to_close_pull_request":35690.0,"past_year_issues_closed_count":2,"past_year_pull_requests_closed_count":8,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":7,"past_year_avg_comments_per_issue":0.42857142857142855,"past_year_avg_comments_per_pull_request":0.75,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":4,"created_at":"2024-07-16T00:02:18.507Z","updated_at":"2026-01-05T05:01:03.695Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbatteryml","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbatteryml/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":31,"CONTRIBUTOR":3,"COLLABORATOR":2},"pull_request_author_associations_count":{"COLLABORATOR":17,"NONE":11,"CONTRIBUTOR":5},"issue_authors":{"myalos":2,"MarkVeerasingam":2,"JingyiJia":2,"Tian042000":2,"tanevitt":2,"fingertap":2,"gupspriya":1,"lijie2552":1,"Spike0999":1,"zchccsx":1,"bysdyc":1,"ehappymonkey":1,"dineshresearch":1,"ymxka":1,"Roy027":1,"alexanderkell":1,"ruby0103":1,"igoramaralms":1,"Fisher669":1,"jianzuo":1,"Compphsy":1,"maboualidev":1,"alexwin9478":1,"CompRhys":1,"Pr0-C0der":1,"eymenipek":1,"Kashif-Raza6":1,"HasanTheSyrian":1,"sjtu-deng":1,"heman200th":1},"pull_request_authors":{"agiamason":8,"opqrst-chen":4,"fingertap":3,"Kashif-Raza6":2,"Ruifeng-Tan":2,"RL5656":2,"HasanTheSyrian":2,"chakkritte":2,"CompRhys":2,"Kokkales":2,"visitorckw":1,"dolphin-zs":1,"tanevitt":1,"shun-zheng":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-05T00:00:08.668Z","repositories_count":14078205,"issues_count":34459816,"pull_requests_count":112450955,"authors_count":11225493,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"NONE":3},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{"igoramaralms":1,"Pr0-C0der":1,"zchccsx":1},"past_year_pull_request_authors":{},"maintainers":[{"login":"agiamason","count":8,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/agiamason"},{"login":"fingertap","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/fingertap"},{"login":"opqrst-chen","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/opqrst-chen"},{"login":"dolphin-zs","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dolphin-zs"},{"login":"shun-zheng","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/shun-zheng"}],"active_maintainers":[]},"events":{"total":{"ReleaseEvent":1,"PullRequestEvent":10,"ForkEvent":39,"IssuesEvent":10,"WatchEvent":156,"IssueCommentEvent":16,"PushEvent":4,"PullRequestReviewEvent":4,"CreateEvent":3},"last_year":{"ForkEvent":20,"IssuesEvent":2,"WatchEvent":79,"IssueCommentEvent":3}},"keywords":[],"dependencies":[{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2023-08-30T14:16:00.310Z","updated_at":"2023-08-30T14:16:00.310Z","repository_link":"https://github.com/microsoft/BatteryML/blob/main/requirements.txt","dependencies":[{"id":13189052572,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052573,"package_name":"addict","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052574,"package_name":"fire","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052575,"package_name":"numpy","ecosystem":"pypi","requirements":"==1.24","direct":true,"kind":"runtime","optional":false},{"id":13189052576,"package_name":"tqdm","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052577,"package_name":"scipy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052578,"package_name":"scikit-learn","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052579,"package_name":"pyyaml","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052580,"package_name":"numba","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052581,"package_name":"matplotlib","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13189052582,"package_name":"torch","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]}],"score":9.069698042173716,"created_at":"2024-07-16T00:01:36.469Z","updated_at":"2026-04-07T02:00:23.886Z","avatar_url":"https://github.com/microsoft.png","language":"Jupyter Notebook","category":"Energy Storage","sub_category":"Battery","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\u003cdiv align=\"center\"\u003e  \n  \u003cimg src=\"./image/Logo_RGB.png\" width=\"300\"\u003e \n\u003c/div\u003e  \n\n# BatteryML: An Open-Source Tool for Machine Learning on Battery Degradation\n## Recent News\nOfficial code and data repository of BatteryML: An Open-Source Tool for Machine Learning on Battery Degradation (ICLR 2024). Please star, watch, and fork BatteryML for the active updates! We appreciate any questions and suggestions! \n\nOur paper is now available on [Arxiv](https://arxiv.org/abs/2310.14714) and [ICLR 2024](https://iclr.cc/virtual/2024/poster/17628)!  This paper provides detailed introduction to our design, which we will be actively updating during the development of BatteryML.\n\n## Introduction\n\nThe performance degradation of lithium batteries is a complex electrochemical process, involving factors such as the growth of solid electrolyte interface, lithium precipitation, loss of active materials, etc. Furthermore, this inevitable performance degradation can have a significant impact on critical commercial scenarios, such as causing 'range anxiety' for electric vehicle users and affecting the power stability of energy storage systems. Therefore, effectively analyzing and predicting the performance degradation of lithium batteries to provide guidance for early prevention and intervention has become a crucial research topic.\n\nTo this end, we open source the BatteryML tool to facilitate the research and development of machine learning on battery degradation.\nWe hope BatteryML can empower both battery researchers and data scientists to gain deeper insights from battery degradation data and build more powerful models for accurate predictions and early interventions.\n\n## Framework\n\n\u003c!-- \u003cimg src=\"./image/framework.png\" width=\"800\"\u003e --\u003e\n\n\u003cimg src=\"./image/framework_new.png\" width=\"800\"\u003e\n\n## Highlights:\n- **Open-source and Community-driven:** BatteryML is an open-source project for battery degradation modeling, encouraging contributions and collaboration from the communities of both computer science and battery research to push the frontiers of this crucial field.\n- **A Comprehensive Dataset Collection:** BatteryML includes a comprehensive dataset collection, allowing easy accesses to most publicly available battery data.\n- **Preprocessing and Feature Engineering:** Our tool offers built-in data preprocessing and feature engineering capabilities, making it easier for researchers and developers to prepare ready-to-use battery datasets for machine learning.\n- **A Wide Range of Models:** BatteryML already includes most classic models in the literature, enabling developers to quickly compare and benchmark different approaches.\n- **Extensible and Customizable:** BatteryML provides flexible interfaces to support further extensions and customizations, making it a versatile tool for potential applications in battery research.\n\n## Dataset\n| Data Source | Electrode Chemistry | Nominal Capacity | Voltage Range (V) | RUL dist. | SOC dist. (%) | SOH dist. (%) | Cell Count |  \n|---|---|---|---|---|---|---|---|  \n| CALCE | LCO/graphite | 1.1 | 2.7-4.2 | 566±106 | 77±17 | 48±30 | 13 |  \n| MATR | LFP/graphite | 1.1 | 2.0-3.6 | 823±368 | 93±7 | 36±36 | 180 |  \n| HUST | LFP/graphite | 1.1 | 2.0-3.6 | 1899±389 | 100±10 | 43±28 | 77 |  \n| HNEI | NMC_LCO/graphite | 2.8 | 3.0-4.3 | 248±15 | 64±17 | 49±28 | 14 |  \n| RWTH | NMC/carbon | 1.11 | 3.5-3.9 | 658±64 | 60±24 | 46±22 | 48 |  \n| SNL | NCA,NMC,LFP/graphite | 1.1 | 2.0-3.6 | 1256±1321 | 86±7 | 45±27 | 61 |  \n| UL_PUR | NCA/graphite | 3.4 | 2.7-4.2 | 209±50 | 89±6 | 41±33 | 10 |  \n\nFor RUL (Remaining Useful Life) tasks, we also created combined datasets from the public sources to assess training efficacy when various battery data are combined. Notably:\n- CRUH combines CALCE, RWTH, UL_PUR, and HNEI datasets\n- CRUSH merges CALCE, RWTH, UL_PUR, SNL, and HNEI datasets\n- MIX incorporates all datasets used in our study.\n\nFor more detailed information on the data, please refer to the Appendix A of our paper.\n\n\n## Benchmark result of RUL(Remain Useful Life) task\nBenchmark results for remaining useful life prediction. The comparison methods are split into four types, including \n1) dummy regressor, a trivial baseline that uses the mean of training label as predictions; \n2) linear models with features designed by domain experts; \n3) traditional statistical models with *QdLinear* feature; \n4) deep models with *QdLinear* feature. \n\nFor models sensitive to initialization, we present the error mean across ten seeds and attach the standard deviation as subscript.  \n\n| **Models**     | **MATR1** | **MATR2** | **HUST** | **SNL** | **CLO** | **CRUH** | **CRUSH** | **MIX** |  \n|----------------|-----------|-----------|----------|---------|---------|----------|-----------|---------|  \n| Dummy regressor|398        |510        |419       |466      |331      |239       |576        |573      |  \n| \"Variance\" model|136       |211        |398       |360      |179      |118       |506        |521      |  \n| \"Discharge\" model|329      |**149**    |**322**   |267      |143      |76        |\u003e1000    |\u003e1000  |  \n| \"Full\" model   |167        |\u003e1000    |335       |433      |**138**  |93        |\u003e1000    |331      |  \n| Ridge regression|116       |184        |\u003e1000   |242      |169      |65        |\u003e1000    |372      |  \n| PCR            |**90**    |187        |435       |**200**  |197      |68        |560        |376      |  \n| PLSR           |104        |181        |431       |242      |176      |**60**    |535        |383      |  \n| Gaussian process|154       |224        |\u003e1000   |251      |204      |115       |\u003e1000    |573      |  \n| XGBoost        |334        |799        |395       |547      |215      |119       |**330**    |205      |  \n| Random forest  |168±9      |233±7      |368±7     |532±25   |192±2    |81±1      |416±5      |**197±0**|  \n| MLP            |149±3      |275±27     |459±9     |370±81   |146±5    |103±4     |565±9      |451±42   |  \n| CNN            |102±94     |228±104    |465±75    |924±267  |\u003e1000  |174±92    |545±11     |272±101  |  \n| LSTM           |119±11     |219±33     |443±29    |539±40   |222±12   |105±10    |519±39     |268±9    |  \n| Transformer    |135±13     |364±25     |391±11    |424±23   |187±14   |81±8      |550±21     |271±16   |  \n  \n\n\n## Quick Start\n\n### Install\n\n```shell\npip install -r requirements.txt\npip install .\n```\n\nThis will install the BatteryML into your Python environment, together with a convenient command line interface (CLI) `batteryml`.\nYou may also need to [install PyTorch](https://pytorch.org/get-started/locally/) for deep models.\n\n### Download Raw Data and Run Preprocessing Scripts\n\u003c!-- Download the raw data and execute the preprocessing scripts as per the provided [instruction](./dataprepare.md). You can also use the code below to download public datasets and convert them to BatteryML's uniform data format. --\u003e\nDownload raw files of public datasets and preprocess them into `BatteryData` of BatteryML is now as simple as two commands:\n\n```bash\nbatteryml download MATR /path/to/save/raw/data\nbatteryml preprocess MATR /path/to/save/raw/data /path/to/save/processed/data\n```\n\n### Run Cycler Preprocessing Scripts to process your data\nIf your data is measured by a cycler such as ARBIN, NEWARE, etc., you can use this command to process your data into `BatteryData` of BatteryML.\n\n```bash\nbatteryml preprocess ARBIN /path/to/save/raw/data /path/to/save/processed/data --config /path/to/config/yaml/file\n```\n\nDue to variations in software versions and configurations, the data format and fields exported by the same cycler may differ. Therefore, we have added default processing configurations in the `/configs/cycler` directory to map raw data to target data fields. You can edit these default configurations as needed.\n\nWe currently support `ARBIN` and `NEWARE` data formats. Additionally, `Biologic`, `LANDT`, and `Indigo` formats are being integrated.  If you encounter any issues with our cycler processing your data, please submit an issue and attach a sample data file to help us ensure rapid compatibility with your data format.\n\n\n\n### Run training and/or inference tasks using config files\n\nBatteryML supports using a simple config file to specify the training and inference process. We provided several examples in `configs`. For example, to reproduce the \"variance\" model for battery life prediction, run\n\n```bash\nbatteryml run configs/baselines/sklearn/variance_model/matr_1.yaml --workspace ./workspace/test --train --eval\n```\n\n\n## Citation\n\nIf you find this work useful, we would appreciate citations to the following paper:\n```\n@inproceedings{zhang2024batteryml,\n  title={Battery{ML}: An Open-source Platform for Machine Learning on Battery Degradation},\n  author={Han Zhang and Xiaofan Gui and Shun Zheng and Ziheng Lu and Yuqi Li and Jiang Bian},\n  booktitle={The Twelfth International Conference on Learning Representations},\n  year={2024}\n}\n```\n\n## Documentation\n\nBy leveraging BatteryML, researchers can gain valuable insights into the latest advancements in battery prediction and materials science, enabling them to conduct experiments efficiently and effectively. We invite you to join us in our journey to accelerate battery research and innovation by contributing to and utilizing BatteryML for your research endeavors.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["3d-map","web-map"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/296634","html_url":"https://ost.ecosyste.ms/projects/296634"}