{"id":13869687,"url":"https://github.com/MLMI2-CSSI/foundry","last_synced_at":"2025-07-15T18:31:48.857Z","repository":{"id":37554721,"uuid":"236077574","full_name":"MLMI2-CSSI/foundry","owner":"MLMI2-CSSI","description":"Simplifying the discovery and usage of machine-learning ready datasets in materials science and chemistry","archived":false,"fork":false,"pushed_at":"2025-05-20T18:32:28.000Z","size":48703,"stargazers_count":81,"open_issues_count":35,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-27T00:27:01.576Z","etag":null,"topics":["chemistry","data-science","datasets","machine-learning","materials-science"],"latest_commit_sha":null,"homepage":"","language":"Python","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/MLMI2-CSSI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support/troubleshooting.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-24T20:24:53.000Z","updated_at":"2025-06-10T14:06:42.000Z","dependencies_parsed_at":"2023-02-12T05:02:48.982Z","dependency_job_id":"c05521fa-8cc0-439e-934c-ffb934f095c7","html_url":"https://github.com/MLMI2-CSSI/foundry","commit_stats":{"total_commits":668,"total_committers":31,"mean_commits":"21.548387096774192","dds":0.7769461077844311,"last_synced_commit":"950f95f1810dce74fcadfd056419165ceb55033c"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/MLMI2-CSSI/foundry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLMI2-CSSI%2Ffoundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLMI2-CSSI%2Ffoundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLMI2-CSSI%2Ffoundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLMI2-CSSI%2Ffoundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MLMI2-CSSI","download_url":"https://codeload.github.com/MLMI2-CSSI/foundry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLMI2-CSSI%2Ffoundry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264169988,"owners_count":23567424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chemistry","data-science","datasets","machine-learning","materials-science"],"created_at":"2024-08-05T20:01:11.908Z","updated_at":"2025-07-15T18:31:47.845Z","avatar_url":"https://github.com/MLMI2-CSSI.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n\u003cpicture\u003e\n  \u003csource srcset=\"https://raw.githubusercontent.com/MLMI2-CSSI/foundry/main/assets/foundry-white.png\" height=175\" media=\"(prefers-color-scheme: dark)\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/MLMI2-CSSI/foundry/main/assets/foundry-black.png\" height=\"175\"\u003e\n\u003c/picture\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/foundry_ml.svg)](https://pypi.python.org/pypi/foundry_ml)\n[![Tests](https://github.com/MLMI2-CSSI/foundry/actions/workflows/tests.yml/badge.svg)](https://github.com/MLMI2-CSSI/foundry/actions/workflows/tests.yml)\n[![Tests](https://github.com/MLMI2-CSSI/foundry/actions/workflows/python-publish.yml/badge.svg)](https://github.com/MLMI2-CSSI/foundry/actions/workflows/python-publish.yml)\n[![NSF-1931306](https://img.shields.io/badge/NSF-1931306-blue)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1931306\u0026HistoricalAwards=false)\n[\u003cimg src=\"https://img.shields.io/badge/view-documentation-blue\"\u003e](https://ai-materials-and-chemistry.gitbook.io/foundry/)\n\n\nFoundry-ML simplifies the discovery and usage of ML-ready datasets in materials science and chemistry providing a simple API to access even complex datasets. \n* Load ML-ready data with just a few lines of code\n* Work with datasets in local or cloud environments. \n* Publish your own datasets with Foundry to promote community usage\n* (in progress) Run published ML models without hassle\n\nLearn more and see our available datasets on [Foundry-ML.org](https://foundry-ml.org/)\n\n\n\n# Documentation\nInformation on how to install and use Foundry is available in our documentation [here](https://ai-materials-and-chemistry.gitbook.io/foundry/v/docs/).\n\nDLHub documentation for model publication and running information can be found [here](https://dlhub-sdk.readthedocs.io/en/latest/servable-publication.html).\n\n# Quick Start\nInstall Foundry-ML via command line with:\n`pip install foundry_ml`\n\nYou can use the following code to import and instantiate Foundry-ML, then load a dataset.\n\n```python\nfrom foundry import Foundry\nf = Foundry(index=\"mdf\")\n\n\nf = f.load(\"10.18126/e73h-3w6n\", globus=True)\n```\n*NOTE*: If you run locally and don't want to install the [Globus Connect Personal endpoint](https://www.globus.org/globus-connect-personal), just set the `globus=False`.\n\nIf running this code in a notebook, a table of metadata for the dataset will appear:\n\n\u003cimg width=\"903\" alt=\"metadata\" src=\"https://user-images.githubusercontent.com/16869564/197038472-0b6ae559-4a6b-4b20-88e5-679bb6eb4f5c.png\"\u003e\n\nWe can use the data with `f.load_data()` and specifying splits such as `train` for different segments of the dataset, then use matplotlib to visualize it.\n\n```python\nres = f.load_data()\n\nimgs = res['train']['input']['imgs']\ndesc = res['train']['input']['metadata']\ncoords = res['train']['target']['coords']\n\nn_images = 3\noffset = 150\nkey_list = list(res['train']['input']['imgs'].keys())[0+offset:n_images+offset]\n\nfig, axs = plt.subplots(1, n_images, figsize=(20,20))\nfor i in range(n_images):\n    axs[i].imshow(imgs[key_list[i]])\n    axs[i].scatter(coords[key_list[i]][:,0], coords[key_list[i]][:,1], s = 20, c = 'r', alpha=0.5)\n```\n\u003cimg width=\"595\" alt=\"Screen Shot 2022-10-20 at 2 22 43 PM\" src=\"https://user-images.githubusercontent.com/16869564/197039252-6d9c78ba-dc09-4037-aac2-d6f7e8b46851.png\"\u003e\n\n[See full examples](./examples)\n\n# How to Cite\nIf you find Foundry-ML useful, please cite the following [paper](https://doi.org/10.21105/joss.05467)\n\n```\n@article{Schmidt2024,\n  doi = {10.21105/joss.05467},\n  url = {https://doi.org/10.21105/joss.05467},\n  year = {2024}, publisher = {The Open Journal},\n  volume = {9},\n  number = {93},\n  pages = {5467},\n  author = {Kj Schmidt and Aristana Scourtas and Logan Ward and Steve Wangen and Marcus Schwarting and Isaac Darling and Ethan Truelove and Aadit Ambadkar and Ribhav Bose and Zoa Katok and Jingrui Wei and Xiangguo Li and Ryan Jacobs and Lane Schultz and Doyeon Kim and Michael Ferris and Paul M. Voyles and Dane Morgan and Ian Foster and Ben Blaiszik},\n  title = {Foundry-ML - Software and Services to Simplify Access to Machine Learning Datasets in Materials Science}, journal = {Journal of Open Source Software}\n}\n```\n\n# Contributing\nFoundry is an Open Source project and we encourage contributions from the community. To contribute, please fork from the `main` branch and open a Pull Request on the `main` branch. A member of our team will review your PR shortly.\n\n## Developer notes\nIn order to enforce consistency with external schemas for the metadata and datacite structures ([contained in the MDF data schema repository](https://github.com/materials-data-facility/data-schemas)) the `dc_model.py` and `project_model.py` pydantic data models (found in the `foundry/jsonschema_models` folder) were generated using the [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator/) tool. In order to ensure compliance with the flake8 linting, the `--use-annoted` flag was passed to ensure regex patterns in `dc_model.py` were specified using pydantic's `Annotated` type vs the soon to be deprecated `constr` type. The command used to run the datamodel-code-generator looks like:\n```\ndatamodel-codegen --input dc.json --output dc_model.py --use-annotated\n```\n\n# Primary Support\nThis work was supported by the National Science Foundation under NSF Award Number: 1931306 \"Collaborative Research: Framework: Machine Learning Materials Innovation Infrastructure\".\n\n# Other Support\nFoundry-ML brings together many components in the materials data ecosystem. Including [MAST-ML](https://mastmldocs.readthedocs.io/en/latest/), the [Data and Learning Hub for Science](https://www.dlhub.org) (DLHub), and the [Materials Data Facility](https://materialsdatafacility.org) (MDF).\n\n## MAST-ML\nThis work was supported by the National Science Foundation (NSF) SI2 award No. 1148011 and DMREF award number DMR-1332851\n\n## The Data and Learning Hub for Science (DLHub)\nThis material is based upon work supported by Laboratory Directed Research and Development (LDRD) funding from Argonne National Laboratory, provided by the Director, Office of Science, of the U.S. Department of Energy under Contract No. DE-AC02-06CH11357.\nhttps://www.dlhub.org\n\n## The Materials Data Facility\nThis work was performed under financial assistance award 70NANB14H012 from U.S. Department of Commerce, National Institute of Standards and Technology as part of the [Center for Hierarchical Material Design (CHiMaD)](http://chimad.northwestern.edu). This work was performed under the following financial assistance award 70NANB19H005 from U.S. Department of Commerce, National Institute of Standards and Technology as part of the Center for Hierarchical Materials Design (CHiMaD). This work was also supported by the National Science Foundation as part of the [Midwest Big Data Hub](http://midwestbigdatahub.org) under NSF Award Number: 1636950 \"BD Spokes: SPOKE: MIDWEST: Collaborative: Integrative Materials Design (IMaD): Leverage, Innovate, and Disseminate\".\nhttps://www.materialsdatafacility.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMLMI2-CSSI%2Ffoundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMLMI2-CSSI%2Ffoundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMLMI2-CSSI%2Ffoundry/lists"}