A deep learning framework for AI-driven multi-physics systems
Project description
Modulus (Beta)
Modulus is an open source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art Physics-ML methods.
Whether you are exploring the use of Neural operators like Fourier Neural Operators or interested in Physics informed Neural Networks or a hybrid approach in between, Modulus provides you with the optimized stack that will enable you to train your models at real world scale.
This package is the core module that provides the core algorithms, network architectures and utilities that cover a broad spectrum of physics-constrained and data-driven workflows to suit the diversity of use cases in the science and engineering disciplines.
Detailed information on features and capabilities can be found in the Modulus documentation.
Modulus Packages
Installation
PyPi
The recommended method for installing the latest version of Modulus is using PyPi:
pip install nvidia-modulus
The installation can be verified by running a simple python code snippet as shown below:
python
>>> import torch
>>> from modulus.models.mlp.fully_connected import FullyConnected
>>> model = FullyConnected(in_features=32, out_features=64)
>>> input = torch.randn(128, 32)
>>> output = model(input)
>>> output.shape
torch.Size([128, 64])
NVCR Container
The recommended Modulus docker image can be pulled from the NVIDIA Container Registry:
docker pull nvcr.io/nvidia/modulus/modulus:23.05
Inside the container you can clone the Modulus git repositories and get started with the examples. Below command show the instructions to launch the modulus container and run an example from the Modulus Launch repo.
docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --runtime nvidia \
--rm -it nvcr.io/nvidia/modulus/modulus:23.05 bash
git clone https://github.com/NVIDIA/modulus-launch.git
cd modulus-launch/examples/cfd/darcy_fno/
pip install warp-lang # install NVIDIA Warp to run the darcy example
python train_fno_darcy.py
From Source
Package
For a local build of the Modulus Python package from source use:
git clone git@github.com:NVIDIA/modulus.git && cd modulus
pip install --upgrade pip
pip install .
Source Container
To build Modulus docker image:
docker build -t modulus:deploy --target deploy -f Dockerfile .
Alternatively, you can run make container-deploy
To build CI image:
docker build -t modulus:ci --target ci -f Dockerfile .
Alternatively, you can run make container-ci
Contributing
Modulus is an open source collaboration and its success is rooted in community contribution to further the field of Physics-ML. Thank you for contributing to the project so others can build on your contribution. For guidance on making a contribution to Modulus, please refer to the contributing guidelines.
Communication
- Github Discussions: Discuss new architectures, implementations, Physics-ML research, etc.
- GitHub Issues: Bug reports, feature requests, install issues, etc.
- Modulus Forum: The Modulus Forum hosts an audience of new to moderate level users and developers for general chat, online discussions, collaboration, etc.
License
Modulus is provided under the Apache License 2.0, please see LICENSE.txt for full license text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file nvidia_modulus-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: nvidia_modulus-0.2.1-py3-none-any.whl
- Upload date:
- Size: 266.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4db85685a2ecb339fe413c178b01da038520dd658cc11f21d64fb8f6cd8371b |
|
MD5 | 89fd829042292c7c2a5f90f90e3b742a |
|
BLAKE2b-256 | 49fb4b678a5ee139583d7b04ca0b1cb2d263b593a90c148dd59f2bb52081ed0c |