This document is meant to inform users of physicsnemo of high level changes to the repository, provide a little background on why they were necessary, and give you some guidance on updating your code.
This guide is a work in progress. Please come back later for more information.
The core packages of physicsnemo have been reorganized to prevent circular imports. For most uses, the key changes are:
physicsnemo.models.Moduleandphysicsnemo.models.Metaare now inphysicsnemo.core.physicsnemo.launchis completely deprecated and removed. Logging functionality is now inphysicsnemo.utils.logging, while checkpoint functionality is now inphysicsnemo.utils.checkpoint- Many layer-like components have been migrated to
physicsnemo.nn, from bothphysicsnemo.modelsand fromphysicsnemo.utils - Model-specific utility functions have been relocated to adjacent to their
corresponding model. For example,
physicsnemo.utils.dominonow is located atphysicsnemo.models.domino.utils. - Domain Parallelism has been separated from distributed utilities to provide
better isolation for users of just the distributed utilities.
ShardTensoris now located inphysicsnemo.domain_parallelism.
Several new packages have been introduced for PhysicsNeMo v2.0. At a high level:
physicsnemo.nncontains reusable, pytorch-like modules for building blocks of layers.physicsnemo.nn.functionalcontains a functional interface to these layers, where appropriate.physicsnemo.domain_parallelcontains theShardTensorobject and utilities.- [TBD]
physicsnemo.diffusion - [TBD]
physicsnemo.mesh
The core dependencies of physicsnemo have been identified and consolidated.
Optional dependencies are now aggressively protected throughout the code base.
Circular imports inside the code base have been fixed, and external imports
have additional requirements to be met before introducing them.
uv is now the preferred way to install and develop with physicsnemo. pip
is still a viable installation method.
[TBD]
[TBD]
To update your code for physicsnemo v2.0, you will need to adjust several key
import paths (like logging, see above) and potentially update datapipes
and model checkpoints.
Please contact the development team via github issues on the physicsnemo repository.