đź“ť NVIDIA Modulus has been renamed to NVIDIA PhysicsNeMo
Getting Started | Install guide | Contributing Guidelines | Resources | PhysicsNeMo Migration Guide | Communication | License
NVIDIA PhysicsNeMo is an open-source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art SciML methods for AI4science and engineering.
PhysicsNeMo provides utilities and optimized pipelines to develop AI models that combine physics knowledge with data, enabling real-time predictions.
Whether you are exploring the use of Neural operators, GNNs, or transformers or are interested in Physics-informed Neural Networks or a hybrid approach in between, PhysicsNeMo provides you with an optimized stack that will enable you to train your models at scale.
- More About PhysicsNeMo
- Who is contributing to PhysicsNeMo
- Why use PhysicsNeMo
- Getting Started
- Resources
- Installation
- Contributing
- Communication
- License
At a granular level, PhysicsNeMo provides a library of a few key components:
Component | Description |
---|---|
physicsnemo.models | A collection of optimized, customizable, and easy-to-use models such as Fourier Neural Operators, Graph Neural Networks, and many more |
physicsnemo.datapipes | A data pipeline and data loader library, including benchmark datapipes, weather daptapipes, and graph datapipes |
physicsnemo.distributed | A distributed computing library build on top of torch.distributed to enable parallel training with just a few steps |
physicsnemo.sym.geometry | A library to handle geometry for DL training using the Constructive Solid Geometry modeling and CAD files in STL format. |
physicsnemo.sym.eq | A library to use PDEs in your DL training with several implementations of commonly observed equations and easy ways for customization. |
For a complete list, refer to the PhysicsNeMo API documentation for PhysicsNeMo Core and PhysicsNeMo Sym.
Usually, PhysicsNeMo is used either as:
- A complementary tool to Pytorch when exploring AI for SciML and AI4Science applications.
- A deep learning research platform that provides scale and optimal performance on NVIDIA GPUs.
Elaborating Further:
PhysicsNeMo provides a highly optimized and scalable training library for maximizing the power of NVIDIA GPUs. Distributed computing utilities allow for efficient scaling from a single GPU to multi-node GPU clusters with a few lines of code, ensuring that large-scale. physics-informed machine learning (ML) models can be trained quickly and effectively. The framework includes support for advanced. optimization utilities, tailor made datapipes, validation utilities to enhance the end to end training speed.
PhysicsNeMo offers a comprehensive library of state-of-the-art models specifically designed for physics-ML applications. The Model Zoo includes generalizable model architectures such as Fourier Neural Operators (FNOs), DeepONet, Physics-Informed Neural Networks (PINNs), Graph Neural Networks (GNNs), and generative AI models like Diffusion Models as well as domain-specific models such as Deep Learning Weather Prediction (DLWP) and Super Resolution Network (SrNN) among others. These models are optimized for various physics domains, such as computational fluid dynamics, structural mechanics, and electromagnetics. Users can download, customize, and build upon these models to suit their specific needs, significantly reducing the time required to develop high-fidelity simulations.
PhysicsNeMo is built on top of PyTorch, providing a familiar and user-friendly experience for those already proficient with PyTorch. This includes a simple Python interface and modular design, making it easy to use PhysicsNeMo with existing PyTorch workflows. Users can leverage the extensive PyTorch ecosystem, including its libraries and tools while benefiting from PhysicsNeMo's specialized capabilities for physics-ML. This seamless integration ensures users can quickly adopt PhysicsNeMo without a steep learning curve.
For more information, refer Converting PyTorch Models to PhysicsNeMo Models
PhysicsNeMo is designed to be highly extensible, allowing users to add new functionality with minimal effort. The framework provides Pythonic APIs for defining new physics models, geometries, and constraints, making it easy to extend its capabilities to new use cases. The adaptability of PhysicsNeMo is further enhanced by key features such as ONNX support for flexible model deployment, robust logging utilities for streamlined error handling, and efficient checkpointing to simplify model loading and saving.
This extensibility ensures that PhysicsNeMo can adapt to the evolving needs of researchers and engineers, facilitating the development of innovative solutions in the field of physics-ML.
Detailed information on features and capabilities can be found in the PhysicsNeMo documentation.
Reference samples cover a broad spectrum of physics-constrained and data-driven workflows to suit the diversity of use cases in the science and engineering disciplines.
Tip
Have questions about how PhysicsNeMo can assist you? Try our [Experimental] chatbot, PhysicsNeMo Guide, for answers.
You can start using PhysicsNeMo in your PyTorch code as simple as shown here:
python
>>> import torch
>>> from physicsnemo.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])
- PhysicsNeMo Symbolic: This repository of algorithms and utilities allows SciML researchers and developers to physics inform model training and model validation. It also provides a higher level abstraction for domain experts that is native to science and engineering.
The following are packages dedicated for domain experts of specific communities catering to their unique exploration needs.
- Earth-2 Studio: Open source project to enable climate researchers and scientists to explore and experiment with AI models for weather and climate.
The following are research packages that get packaged into PhysicsNeMo once they are stable.
- PhysicsNeMo Makani: Experimental library designed to enable the research and development of machine-learning based weather and climate models.
- Earth2 Grid: Experimental library with utilities for working geographic data defined on various grids.
- Earth-2 MIP: Experimental library with utilities for model intercomparison for weather and climate models.
PhysicsNeMo is an open source project and gets contributions from researchers in the SciML and AI4science fields. While PhysicsNeMo team works on optimizing the underlying SW stack, the community collaborates and contributes model architectures, datasets, and reference applications so we can innovate in the pursuit of developing generalizable model architectures and algorithms.
Some latest examples of community contributors are HP Labs 3D Printing team, Stanford Cardiovascular research team, UIUC team, CMU team etc.
Latest examples of research teams using PhysicsNeMo are ORNL team, TU Munich CFD team etc.
Please navigate to this page for a complete list of research work leveraging PhysicsNeMo. For a list of enterprises using PhysicsNeMo refer here.
Using PhysicsNeMo and interested in showcasing your work on NVIDIA Blogs? Fill out this proposal form and we will get back to you!
Here are some of the key benefits of PhysicsNeMo for SciML model development:
See what your peer SciML researchers are saying about PhysicsNeMo (Coming soon).
The following resources will help you in learning how to use PhysicsNeMo. The best way is to start with a reference sample and then update it for your own use case.
- Using PhysicsNeMo with your PyTorch model
- Using PhysicsNeMo built-in models
- Getting started Guide
- Reference Samples
- User guide Documentation
- Getting started Webinar
- AI4Science PhysicsNeMo Bootcamp
- PhysicsNeMo Pretrained models
- PhysicsNeMo Datasets and Supplementary materials
- Self-paced PhysicsNeMo DLI training
- Deep Learning for Science and Engineering Lecture Series with PhysicsNeMo
- Video Tutorials
The recommended method for installing the latest version of PhysicsNeMo is using PyPi:
pip install nvidia-physicsnemo
The installation can be verified by running the hello world example as demonstrated here.
PhysicsNeMo has many optional dependencies that are used in specific components.
When using pip, all dependencies used in PhysicsNeMo can be installed with
pip install nvidia-physicsnemo[all]
. If you are developing PhysicsNeMo, developer dependencies
can be installed using pip install nvidia-physicsnemo[dev]
. Otherwise, additional dependencies
can be installed on a case by case basis. Detailed information on installing the
optional dependencies can be found in the
Getting Started Guide.
The recommended PhysicsNeMo docker image can be pulled from the NVIDIA Container Registry (refer to the NGC registry for the latest tag):
docker pull nvcr.io/nvidia/physicsnemo/physicsnemo:25.03
Inside the container, you can clone the PhysicsNeMo git repositories and get started with the examples. The below command shows the instructions to launch the physicsnemo container and run examples from this repo.
docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --runtime nvidia \
--rm -it nvcr.io/nvidia/physicsnemo/physicsnemo:25.03 bash
git clone https://github.com/NVIDIA/physicsnemo.git
cd physicsnemo/examples/cfd/darcy_fno/
pip install warp-lang # install NVIDIA Warp to run the darcy example
python train_fno_darcy.py
For enterprise supported NVAIE container, refer PhysicsNeMo Secured Feature Branch
For a local build of the PhysicsNeMo Python package from source use:
git clone git@github.com:NVIDIA/physicsnemo.git && cd physicsnemo
pip install --upgrade pip
pip install .
To build PhysicsNeMo docker image:
docker build -t physicsnemo:deploy \
--build-arg TARGETPLATFORM=linux/amd64 --target deploy -f Dockerfile .
Alternatively, you can run make container-deploy
To build CI image:
docker build -t physicsnemo:ci \
--build-arg TARGETPLATFORM=linux/amd64 --target ci -f Dockerfile .
Alternatively, you can run make container-ci
.
Currently, only linux/amd64
and linux/arm64
platforms are supported. If using
linux/arm64
, some dependencies like warp-lang
might not install correctly.
NVIDIA Modulus has been renamed to NVIDIA PhysicsNeMo. For migration:
- Use
pip install nvidia-physicsnemo
rather thanpip install nvidia-modulus
for PyPi wheels. - Use
nvcr.io/nvidia/physicsnemo/physicsnemo:<tag>
rather thannvcr.io/nvidia/modulus/modulus:<tag>
for Docker containers. - Replace
nvidia-modulus
bynvidia-physicsnemo
in your pip requirements files (requirements.txt
,setup.py
,setup.cfg
,pyproject.toml
, etc.) - In your code, change the import statements from
import modulus
toimport physicsnemo
The old PyPi registry and the NGC container registry will be deprecated soon and will not receive any bug fixes/updates. The old checkpoints will remain compatible with these updates.
More details to follow soon.
PhysicsNeMo 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 top of your contribution.
For guidance on contributing to PhysicsNeMo, please refer to the contributing guidelines.
If PhysicsNeMo helped your research and you would like to cite it, please refer to the guidelines
- Github Discussions: Discuss new architectures, implementations, Physics-ML research, etc.
- GitHub Issues: Bug reports, feature requests, install issues, etc.
- PhysicsNeMo Forum: The PhysicsNeMo Forum hosts an audience of new to moderate-level users and developers for general chat, online discussions, collaboration, etc.
Want to suggest some improvements to PhysicsNeMo? Use our feedback form here.
PhysicsNeMo is provided under the Apache License 2.0, please see LICENSE.txt for full license text. Enterprise SLA, support and preview access are available under NVAIE.