Migrating from Modulus v22.09

To accommodate the growing scope of Physics-ML approaches and the diverse set of use-cases, we have re-architected Modulus to support the needs of both domain experts and AI practitioners to take full advantage of the features present in Modulus. This improved structure provides increased flexibility for AI developers/researchers and applied engineers to use Modulus in ways that make sense to them and their use-case.

Modulus is now comprised of three fundamental repositories:

  1. Modulus (aka Modulus Core): base module that consists of the core components of the framework for developing Physics-ML models
  2. Modulus Symbolic: provides an abstraction layer for using PDE-based symbolic loss functions

If you are an existing user of Modulus (container version 22.09 and older), the existing API is still supported as part of Modulus Sym. We encourage all users to start working with the new Modulus code-base and container to gain access to new features, improved support and bug fixes. Additional migration information is below.
The Modulus repos are structured in such a way that the Sym components are injected into Modulus’ namespace after installation via implicit namespace handling, even if present in separate repos. This means you can use below code to import utilities:

From Modulus


from modulus import <xyz>

From Modulus-Launch


from modulus.launch import <xyz>

From Modulus-Sym


from modulus.sym import <xyz>

All the older utilities of Modulus are under the Modulus Symbolic (Modulus-Sym) umbrella to serve as a collection of higher-level abstractions for users who might not be very comfortable with operating with PyTorch directly. Hence, to make your older examples work, the changes are minimal.

Modulus 22.09 and before:


from modulus.solver import Solver from modulus.domain import Domain from modulus.geometry.primitives_1d import Point1D, Line1D

Re-architected Modulus-Sym:


from modulus.sym.solver import Solver from modulus.sym.domain import Domain from modulus.sym.geometry.primitives_1d import Point1D, Line1D


Q: Which repository do I use to start with Modulus?

A: Please choose based on your application and expertise:

  1. General Physics-ML:

    Models, Datapipes, Utilities, Recipes and Examples: Modulus-Core

  2. Physics-driven learning and higher level abstractions:

    Governing Equation Losses: Modulus-Sym

  3. Examples:

    Learn fluid flow with PDE Loss function: Modulus-Sym Training global weather model on historical data: Modulus

Need a recommendation? Ask on the forums!
Q: What does the Modulus container contain?

A: The Modulus container comes with all the Modulus repos and the required dependencies pre-installed and ready to use. This means that you can get started instantly with any example/recipe from any of the repo and is the best environment to start your development. If you are a more pythonic user, Modulus is also pip installable!

Q: Where are the previous set of Modulus (Symbolic) examples?

A: Modulus-Symbolic examples are presently in the Modulus-Sym repo on Github. The previous Gitlab repository will be depreciated.

Q: Where is the documentation for each of these repositories?

A: All documentation and user guides (new repositories and old) can all be found under the Modulus documentation website.

Q: How can I contribute to the Modulus OSS project?

A: External contributions are at the heart of open-source and we would like to encourage users to contribute to this project with their models, data loaders, recipes/examples, etc. If you are unsure on what to contribute, take a look at the open issues on GitHub and indicate your interest in working on them. We strongly encourage community contributions via feature requests/additions, issue reports, bug fixes, documentation enhancements, etc. Check out the contribution guide for more information.

© Copyright 2023, NVIDIA Modulus Team. Last updated on Apr 26, 2023.