Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MLMI2-CSSI/foundry
Simplifying the discovery and usage of machine-learning ready datasets in materials science and chemistry
https://github.com/MLMI2-CSSI/foundry
chemistry data-science datasets machine-learning materials-science
Last synced: 3 months ago
JSON representation
Simplifying the discovery and usage of machine-learning ready datasets in materials science and chemistry
- Host: GitHub
- URL: https://github.com/MLMI2-CSSI/foundry
- Owner: MLMI2-CSSI
- License: mit
- Created: 2020-01-24T20:24:53.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T15:49:56.000Z (7 months ago)
- Last Synced: 2024-04-25T16:59:28.851Z (7 months ago)
- Topics: chemistry, data-science, datasets, machine-learning, materials-science
- Language: Python
- Homepage:
- Size: 44.8 MB
- Stars: 74
- Watchers: 7
- Forks: 15
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Support: docs/support/project-support.md
Awesome Lists containing this project
README
[![PyPI](https://img.shields.io/pypi/v/foundry_ml.svg)](https://pypi.python.org/pypi/foundry_ml)
[![Tests](https://github.com/MLMI2-CSSI/foundry/actions/workflows/tests.yml/badge.svg)](https://github.com/MLMI2-CSSI/foundry/actions/workflows/tests.yml)
[![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)
[![NSF-1931306](https://img.shields.io/badge/NSF-1931306-blue)](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1931306&HistoricalAwards=false)
[](https://ai-materials-and-chemistry.gitbook.io/foundry/)Foundry-ML simplifies the discovery and usage of ML-ready datasets in materials science and chemistry providing a simple API to access even complex datasets.
* Load ML-ready data with just a few lines of code
* Work with datasets in local or cloud environments.
* Publish your own datasets with Foundry to promote community usage
* (in progress) Run published ML models without hassleLearn more and see our available datasets on [Foundry-ML.org](https://foundry-ml.org/)
# Documentation
Information on how to install and use Foundry is available in our documentation [here](https://ai-materials-and-chemistry.gitbook.io/foundry/v/docs/).DLHub documentation for model publication and running information can be found [here](https://dlhub-sdk.readthedocs.io/en/latest/servable-publication.html).
# Quick Start
Install Foundry-ML via command line with:
`pip install foundry_ml`You can use the following code to import and instantiate Foundry-ML, then load a dataset.
```python
from foundry import Foundry
f = Foundry(index="mdf")f = f.load("10.18126/e73h-3w6n", globus=True)
```
*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`.If running this code in a notebook, a table of metadata for the dataset will appear:
We 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.
```python
res = f.load_data()imgs = res['train']['input']['imgs']
desc = res['train']['input']['metadata']
coords = res['train']['target']['coords']n_images = 3
offset = 150
key_list = list(res['train']['input']['imgs'].keys())[0+offset:n_images+offset]fig, axs = plt.subplots(1, n_images, figsize=(20,20))
for i in range(n_images):
axs[i].imshow(imgs[key_list[i]])
axs[i].scatter(coords[key_list[i]][:,0], coords[key_list[i]][:,1], s = 20, c = 'r', alpha=0.5)
```[See full examples](./examples)
# Contributing
Foundry 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.## Developer notes
In 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:
```
datamodel-codegen --input dc.json --output dc_model.py --use-annotated
```# Primary Support
This work was supported by the National Science Foundation under NSF Award Number: 1931306 "Collaborative Research: Framework: Machine Learning Materials Innovation Infrastructure".# Other Support
Foundry-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).## MAST-ML
This work was supported by the National Science Foundation (NSF) SI2 award No. 1148011 and DMREF award number DMR-1332851## The Data and Learning Hub for Science (DLHub)
This 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.
https://www.dlhub.org## The Materials Data Facility
This 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".
https://www.materialsdatafacility.org