Skip to content

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts

License

Notifications You must be signed in to change notification settings

PaddlePaddle/modulus-sym

 
 

Repository files navigation

Modulus Symbolic (Beta)(Paddle Backend)

图片替代文本 图片替代文本

Important

This branch(paddle) experimentally supports Paddle backend + CINN compiler as almost all the core code has been completely rewritten using the Paddle API.

It is recommended to install nightly-build(develop) Paddle before running any code in this branch.

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub Code style: black

Modulus Symbolic (Modulus Sym) provides pythonic APIs, algorithms and utilities to be used with Modulus core, to explicitly physics inform the model training. This includes symbolic APIs for PDEs, domain sampling and PDE-based residuals.

It also provides higher level abstraction to compose a training loop from specification of the geometry, PDEs and constraints like boundary conditions using simple symbolic APIs. Please refer to the Lid Driven cavity that illustrates the concept. Additional information can be found in the Modulus documentation.

Users of Modulus versions older than 23.05 can refer to the migration guide for updating to the latest version.

Installation

Container

The recommended Modulus docker image can be pulled from the NVIDIA Container Registry:

docker pull nvcr.io/nvidia/modulus/modulus:24.04

From Source[Recommended]

Package

For a local build of the Modulus Symbolic Python package from source use:

git clone -b paddle https://github.com/PaddlePaddle/modulus-sym.git && cd modulus-sym

pip install --upgrade pip
pip install .

Source Container

To build release image, you will need to do the below preliminary steps:

Clone this repo, and download the Optix SDK from https://developer.nvidia.com/designworks/optix/downloads/legacy.

git clone -b paddle https://github.com/PaddlePaddle/modulus-sym.git
cd modulus-sym/ && mkdir deps

Currently Modulus supports v7.0. Place the Optix file in the deps directory and make it executable. Also clone the pysdf library in the deps folder (NVIDIA Internal)

chmod +x deps/NVIDIA-OptiX-SDK-7.0.0-linux64.sh
git clone <internal pysdf repo>

Then to build the image, insert next tag and run below:

docker build -t modulus-sym:deploy \
    --build-arg TARGETPLATFORM=linux/amd64 --target deploy -f Dockerfile .

Alternatively, if you want to skip pysdf installation, you can run the following:

docker build -t modulus-sym:deploy \
    --build-arg TARGETPLATFORM=linux/amd64 --target no-pysdf -f Dockerfile .

Currently only linux/amd64 and linux/arm64 platforms are supported.

Quickly run

Quickly run a simple exmaple: ldc_2d.py with script below.

cd ./examples/ldc/
python ldc_2d.py

Contributing

For guidance on making a contribution to Modulus, see the contributing guidelines.

Communication

  • Github Discussions: Discuss 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 Symbolic is provided under the Apache License 2.0, please see LICENSE.txt for full license text.

About

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%