Skip to content

Commit ad31587

Browse files
committed
Merge branch 'main' into update-nightly-uv-pipeline
2 parents 81a9d2b + 219aca3 commit ad31587

File tree

333 files changed

+24382
-5942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+24382
-5942
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ physicsnemo/models/figconvnet @coreyjadams
113113
# FNO
114114
# NEEDSOWNER
115115

116+
# GLOBE
117+
physicsnemo/models/globe @peterdsharpe
118+
116119
# GNN layers, mesh graphnet, graphcast
117120
physicsnemo/models/gnn_layers @mnabian
118121
physicsnemo/models/meshgraphnet @mnabian
@@ -143,6 +146,9 @@ physicsnemo/models/vfgn @mnabian
143146

144147
# EXAMPLE SPECIFIC OWNERSHIP
145148

149+
# GLOBE
150+
examples/cfd/external_aerodynamics/globe @peterdsharpe
151+
146152
# corrdiff
147153
examples/weather/corrdiff @CharlelieLrt
148154
examples/active_learning @laserkelvin @dallasfoster
@@ -156,5 +162,8 @@ test/utils/generative @CharlelieLrt
156162
test/utils/corrdiff @CharlelieLrt
157163
test/active_learning @laserkelvin @dallasfoster
158164

165+
# GLOBE
166+
test/models/globe @peterdsharpe
167+
159168
# Mesh
160169
test/mesh @peterdsharpe

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body:
3131
attributes:
3232
label: Version
3333
description: What version of PhysicsNeMo are you running?
34-
placeholder: "example: 1.3.0"
34+
placeholder: "example: 2.0.0"
3535
validations:
3636
required: true
3737

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ cython_debug/
165165
nsight-systems*
166166
build/
167167
mlruns/
168+
mlflow.db
168169
checkpoints/
170+
cache/
171+
output/
169172

170173
# Hydra
171174
outputs/

.importlinter

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ containers=
8888
physicsnemo.models
8989
layers =
9090
mesh_reduced
91-
afno | dlwp | dlwp_healpix | dit |domino | dpot | fengwu | figconvnet | fno | graphcast | meshgraphnet | pangu | pix2pix | rnn | srrn | swinvrnn | topodiff | transolver | vfgn | diffusion_unets
91+
afno | dlwp | dlwp_healpix | dit | domino | dpot | fengwu | figconvnet | fno | graphcast | meshgraphnet | pangu | pix2pix | rnn | srrn | swinvrnn | topodiff | transolver | vfgn | diffusion_unets
9292
unet
9393

9494
[importlinter:contract:physicsnemo-diffusion]
@@ -99,7 +99,8 @@ containers=
9999
layers =
100100
generate
101101
samplers : metrics
102-
noise_schedulers | multi_diffusion | preconditioners | guidance
102+
multi_diffusion : preconditioners : guidance
103+
noise_schedulers
103104
utils
104105

105106
[importlinter:contract:physicsnemo-external-imports]

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ repos:
4646
name: license
4747
entry: python test/ci_tests/header_check.py
4848
language: python
49+
additional_dependencies: ['GitPython']
4950
files: \.(py|yaml|ci|release)$|Dockerfile$
5051
exclude: ^(physicsnemo/internal/|docs/)
5152

CHANGELOG.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,41 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
## [2.0.0a0] - 2026-XX-YY
9+
## [2.1.0a0] - 2026-XX-YY
10+
11+
### Added
12+
13+
- Adds GLOBE model (`physicsnemo.experimental.models.globe.model.GLOBE`)
14+
- Adds GLOBE AirFRANS example case (`examples/cfd/external_aerodynamics/globe/airfrans`)
15+
- PhysicsNeMo-Mesh now supports conversion from PyVista/VTK/VTU meshes that may
16+
contain polyhedral cells.
17+
- In PhysicsNeMo-Mesh, adds `Mesh.to_point_cloud()`, `.to_edge_graph()`, and
18+
`.to_dual_graph()` methods. These allow Mesh conversion to 0D point clouds, 1D
19+
edge graphs, and 1D dual graphs, respectively, when connectivity information
20+
is not needed.
21+
22+
### Changed
23+
24+
- Improved crash recipe with configurable stats directory.
25+
26+
### Deprecated
27+
28+
- `physicsnemo.utils.mesh` is deprecated and will be removed in v2.2.0. For
29+
isosurface extraction, use `physicsnemo.mesh.generate.marching_cubes` instead
30+
of `sdf_to_stl`. For VTP/OBJ/STL file conversion (`combine_vtp_files`,
31+
`convert_tesselated_files_in_directory`), use VTK or PyVista directly.
32+
33+
### Removed
34+
35+
### Fixed
36+
37+
- Fixed bug in Pangu, FengWu attention window shift for asymmetric longitudes
38+
39+
### Security
40+
41+
### Dependencies
42+
43+
## [2.0.0] - 2026-03-09
1044

1145
### Added
1246

@@ -27,16 +61,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2761
- DiT (Diffusion Transformer) has been moved from `physicsnemo.experimental.models.dit`
2862
to `physicsnemo.models.dit`.
2963

30-
### Deprecated
31-
32-
### Removed
33-
3464
### Fixed
3565

3666
- Shape mistmatch bug in the Lennard Jones example
3767

38-
### Security
39-
4068
### Dependencies
4169

4270
- CUDA backend is now selected via orthogonal `cu12` / `cu13` extras rather

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,68 @@ we will get back to you.
2525

2626
## Contribute to PhysicsNeMo-Core
2727

28+
### Codebase Structure
29+
30+
- [physicsnemo](physicsnemo) The core python components of the framework live
31+
here. They are listed below not alphabetically but in hierarchical order
32+
(foundational layers first)
33+
- [core](physicsnemo/core) Core utilities for `physicsnemo`, including
34+
tools for model registration, filesystems, warnings, and optional imports.
35+
- [distributed](physicsnemo/distributed) Basic distributed utilities to
36+
enable data parallel training, and some advanced functionality such as
37+
distributed FFTs and more sophisticated functional calls with autograd enabled.
38+
- [utils](physicsnemo/utils) Utility tools common across physicsnemo.
39+
Includes profiling tools, logging tools, model checkpointing and restoration
40+
tools. Note that model-specific tools should *not* go here. Several
41+
classes here are slowly being migrated to other locations or deprecated.
42+
- [nn](physicsnemo/nn) `physicsnemo` offers a number of GPU-optimized,
43+
standalone layers and functions through `physicsnemo.nn` and
44+
`physicsnemo.nn.functional`, with a similar interface to `torch.nn`.
45+
These layers are meant to be compatible with `torch` modules and you
46+
should feel free to mix and match them into your models. We offer,
47+
for several functional calls, highly optimized and custom backends with
48+
significant speedups over pytorch - see our documentation to learn more.
49+
- [models](physicsnemo/models) Our model repository contains a set of
50+
popular scientific AI models implemented with performance enhancements or
51+
other features not easily available elsewhere. Many models are also
52+
featured in training recipes in [examples](examples).
53+
- [datapipes](physicsnemo/datapipes) offers GPU-accelerated datapipes for
54+
scientific AI datasets. We offer both bespoke datapipes for specific
55+
problems, as well as a generic, GPU-focused data pipe abstraction similar
56+
to `torchvision`. This is designed to enable GPU preprocessing of high
57+
resolution scientific data needed for AI for Science.
58+
- [metrics](physicsnemo/metrics) A collection of general as well as domain
59+
specific metrics for AI for Science model training and inference.
60+
- [domain_parallel](physicsnemo/domain_parallel) Unique to PhysicsNeMo, the
61+
`ShardTensor` abstraction provides a generic interface for domain
62+
parallelism enabling extremely high resolution data training on batch size
63+
per GPU < 1. Read our
64+
[documentation](https://docs.nvidia.com/physicsnemo/latest/user-guide/domain_parallelism_entry_point.html)
65+
to find out more.
66+
- [active_learning](physicsnemo/active_learning) The Active Learning module
67+
provides scaffolding for building automated and end-to-end workflows using
68+
active learning techniques.
69+
- [diffusion](physicsnemo/diffusion) `physicsnemo` diffusion offers a
70+
powerful, yet abstracted, collection of diffusion tools to build, train,
71+
and inference a diffusion workflow for scientific problems.
72+
- [experimental](physicsnemo/experimental) New functionality that may not
73+
yet be API-stable is introduced through the experimental layer. The
74+
experimental folder mimics the physicsnemo structure under it's own
75+
namespace, though only in places actively under development. Models
76+
especially are always introduced through experimental.
77+
- [test](test) `physicsnemo` tests live here. New functionality in the core
78+
repository must include test coverage here. Example code can not be tested
79+
from this folder but must be tested in examples.
80+
- [benchmarks](benchmarks) We have automated benchmarking tools for several
81+
components in the library - it's not expected that external contributions will
82+
need to know what's in this folder, though you're welcome to explore and
83+
investigate as you like.
84+
- [docs](docs) Our core documentation folder for the `physicsnemo` API.
85+
If you submit changes to the API, we welcome you to update the docs as well.
86+
- [examples](examples) We have a variety of examples to demonstrate the
87+
functionality of `physicsnemo` to explore. Please visit the examples folder
88+
and README to learn more.
89+
2890
### Coding Style
2991

3092
Beyond using standard tools for formatting and linting, we document and enforce

Dockerfile

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,8 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
8989
fi
9090

9191
# Install vtk and pyvista
92-
ARG VTK_ARM64_WHEEL
93-
ENV VTK_ARM64_WHEEL=${VTK_ARM64_WHEEL:-unknown}
94-
95-
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] && [ "$VTK_ARM64_WHEEL" != "unknown" ]; then \
96-
echo "VTK wheel $VTK_ARM64_WHEEL for $TARGETPLATFORM exists, installing!" && \
97-
uv pip install /physicsnemo/deps/${VTK_ARM64_WHEEL}; \
98-
elif [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
99-
echo "Installing vtk for: $TARGETPLATFORM" && \
100-
uv pip install "vtk>=9.2.6"; \
101-
else \
102-
echo "No custom wheel or wheel on PyPi found. Installing vtk for: $TARGETPLATFORM from source" && \
103-
apt-get update && apt-get install -y libgl1-mesa-dev && \
104-
git clone https://gitlab.kitware.com/vtk/vtk.git && cd vtk && git checkout tags/v9.4.1 && git submodule update --init --recursive && \
105-
mkdir build && cd build && cmake -GNinja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON /workspace/vtk/ && ninja && \
106-
python setup.py bdist_wheel && \
107-
uv pip install dist/vtk-*.whl && \
108-
cd ../../ && rm -r vtk; \
109-
fi
92+
# VTK has started shipping aarch64 wheels, hence we no longer need a custom installation. Ref: https://pypi.org/project/vtk/9.6.0/#files
93+
RUN uv pip install "vtk>=9.6.0"
11094
RUN uv pip install "pyvista>=0.40.1"
11195

11296
# Install onnxruntime (custom wheel for ARM)
@@ -223,13 +207,13 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] && [ "$NATTEN_AMD64_WHEEL" != "unkn
223207
RUN uv pip install --no-build-isolation "torch_sparse"
224208

225209
# All pyproject extras (no dev); installs physicsnemo non-editable
226-
RUN cd /physicsnemo && uv pip install ".[cu13,utils-extras,mesh-extras,datapipes-extras,gnns,perf]"
210+
RUN cd /physicsnemo && uv pip install ".[cu13,utils-extras,mesh-extras,datapipes-extras,gnns]"
227211

228212
# Cleanup builder stage
229213
RUN rm -rf /physicsnemo/
230214

231215
#######################################################################
232-
# CI image: builder + dev group + netcdf4 hack + FigNet/Makani + CI-only packages
216+
# CI image: builder + dev group + FigNet/Makani + CI-only packages
233217
#######################################################################
234218
FROM builder AS ci
235219

@@ -240,8 +224,7 @@ ENV UV_SYSTEM_PYTHON=1
240224
ENV UV_BREAK_SYSTEM_PACKAGES=1
241225
ENV UV_CONSTRAINT=/etc/pip/constraint.txt
242226

243-
# TODO: Remove hacky downgrade of netCDF4. netCDF4 v1.7.1 issue: https://github.com/Unidata/netcdf4-python/issues/1343
244-
RUN uv pip install "netcdf4>=1.6.3,<1.7.1"
227+
RUN uv pip install "netcdf4>1.7.3" dask
245228

246229
COPY . /physicsnemo/
247230

@@ -252,15 +235,15 @@ RUN cd /physicsnemo && uv pip install --group dev
252235
RUN FORCE_CUDA_EXTENSION=1 uv pip install --no-build-isolation "torch-harmonics==0.8.0"
253236
RUN uv pip install "tensorly>=0.8.1" "tensorly-torch>=0.4.0" "torchinfo>=1.8" "webdataset>=0.2"
254237
# Install Makani via direct URL
255-
RUN uv pip install --no-deps "git+https://github.com/NVIDIA/makani.git@v0.2.1#egg=makani"
238+
# RUN uv pip install --no-deps "git+https://github.com/NVIDIA/makani.git@v0.2.1#egg=makani"
256239

257240
# Other CI-only specs (moto, scikit-image, etc.)
258241
RUN uv pip install "moto[s3]>=5.0.28"
259242
RUN uv pip install "numpy-stl" "scikit-image>=0.24.0" "sparse-dot-mkl" "shapely"
260243
RUN uv pip install "multi-storage-client[boto3]>=0.33.0"
261244

262245
# E2Grid install
263-
RUN uv pip install --no-deps --no-build-isolation "git+https://github.com/NVlabs/earth2grid.git@11dcf1b0787a7eb6a8497a3a5a5e1fdcc31232d3"
246+
# RUN uv pip install --no-deps --no-build-isolation "git+https://github.com/NVlabs/earth2grid.git@11dcf1b0787a7eb6a8497a3a5a5e1fdcc31232d3"
264247

265248
# Uninstall the non-editable physicsnemo from builder
266249
RUN uv pip uninstall nvidia-physicsnemo
@@ -301,6 +284,5 @@ ENV UV_BREAK_SYSTEM_PACKAGES=1
301284
ENV UV_CONSTRAINT=/etc/pip/constraint.txt
302285

303286
# Install packages for Sphinx build
304-
RUN uv pip install "protobuf==3.20.3"
305-
RUN uv pip install "recommonmark==0.7.1" "sphinx==5.1.1" "sphinx-rtd-theme==1.0.0" "pydocstyle==6.1.1" "nbsphinx==0.8.9" "nbconvert==6.4.3" "jinja2==3.0.3"
287+
RUN uv pip install "recommonmark>=0.7.1" "sphinx>=5.1.1" "nvidia-sphinx-theme>=0.0.7" "pydocstyle>=6.1.1" "nbsphinx>=0.8.9" "nbconvert>=6.4.3" "jinja2>=3.0.3"
306288
RUN wget https://github.com/jgm/pandoc/releases/download/3.1.6.2/pandoc-3.1.6.2-1-amd64.deb && dpkg -i pandoc-3.1.6.2-1-amd64.deb

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ lint:
2929
pre-commit run markdownlint -a && \
3030
pre-commit run check-added-large-files -a
3131

32-
license:
33-
python test/ci_tests/header_check.py --all-files
32+
license:
33+
pre-commit run license -a
3434

3535
doctest:
3636
coverage run \
3737
--rcfile='test/coverage.docstring.rc' \
3838
-m pytest \
39-
--doctest-modules physicsnemo/ --ignore-glob=*internal* --ignore-glob=*experimental*
39+
--doctest-modules physicsnemo/ --ignore-glob=*internal* --ignore-glob=*experimental* --ignore-glob=*deploy/onnx*
4040

4141
pytest:
4242
coverage run \

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ provides built-in composable modules that are packaged into a few key components
6565
<!-- markdownlint-disable -->
6666
Component | Description |
6767
---- | --- |
68-
[**physicsnemo.models**](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/api/physicsnemo.models.html) | A collection of optimized, customizable, and easy-to-use families of model architectures such as Neural Operators, Graph Neural Networks, Diffusion models, Transformer models, and many more|
68+
[**physicsnemo.models**](https://docs.nvidia.com/physicsnemo/latest/user-guide/model_architectures.html) ( [More Details](https://docs.nvidia.com/physicsnemo/latest/physicsnemo/api_models.html)) | A collection of optimized, customizable, and easy-to-use families of model architectures such as Neural Operators, Graph Neural Networks, Diffusion models, Transformer models, and many more|
6969
[**physicsnemo.datapipes**](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/api/physicsnemo.datapipes.html) | Optimized and scalable built-in data pipelines fine-tuned to handle engineering and scientific data structures like point clouds, meshes, etc.|
7070
[**physicsnemo.distributed**](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/api/physicsnemo.distributed.html) | A distributed computing sub-module built on top of `torch.distributed` to enable parallel training with just a few steps|
7171
[**physicsnemo.curator**](https://github.com/NVIDIA/physicsnemo-curator) | A sub-module to streamline and accelerate the process of data curation for engineering datasets|
@@ -119,7 +119,7 @@ PhysicsNeMo offers a library of state-of-the-art models specifically designed
119119
for Physics-ML applications. Users can build any model architecture by using the underlying
120120
PyTorch layers and combining them with curated PhysicsNeMo layers.
121121

122-
The [Model Zoo](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/api/physicsnemo.models.html#model-zoo)
122+
The [Model Zoo](https://docs.nvidia.com/physicsnemo/latest/user-guide/model_architectures.html)
123123
includes optimized implementations of families of model architectures such as
124124
Neural Operators:
125125

@@ -333,16 +333,14 @@ way is to start with a reference sample and then update it for your own use case
333333

334334
## Installation
335335

336-
The following instructions help you install the base PhysicsNeMo modules to get
337-
started. In addition to this, optional dependencies can be installed to provide
338-
additional functionality. A complete list of optional dependencies is available
339-
in the [`pyproject.toml`](./pyproject.toml) file.
336+
You can install PhysicsNeMo in two supported ways: **via pip** (native pip or
337+
**uv**) or by using the **NVIDIA container image**. Choose the method that fits your
338+
environment and workflow.
340339

341-
The [training recipes](./examples) are not packaged into the pip wheels or the
342-
container to keep the footprint low. We recommend users clone the appropriate
343-
training recipes and use them as a starting point. These training recipes may
344-
require additional example-specific dependencies, as indicated through an
345-
associated `requirements.txt` file in such cases.
340+
The following instructions cover the base PhysicsNeMo modules. Optional dependencies
341+
are listed in [`pyproject.toml`](./pyproject.toml). The [training recipes](./examples)
342+
are not bundled in the pip wheels or container; clone the repo and use the examples
343+
as a starting point. Many examples have a `requirements.txt` for extra dependencies.
346344

347345
### CUDA Backend Selection
348346

@@ -363,7 +361,7 @@ via an extra that is orthogonal to the feature extras - combine them freely:
363361

364362
### PyPI
365363

366-
The recommended method for installing the latest version of PhysicsNeMo is using PyPI:
364+
Install the latest version from PyPI:
367365

368366
```Bash
369367
pip install nvidia-physicsnemo
@@ -387,7 +385,7 @@ The installation can also be verified by running the [Hello World](#hello-world)
387385

388386
### uv
389387

390-
For development or to run examples, we recommend using [uv](https://docs.astral.sh/uv/)
388+
For development or to run examples from source, you can use [uv](https://docs.astral.sh/uv/)
391389
to clone the repository and sync dependencies:
392390

393391
```Bash
@@ -411,7 +409,7 @@ uv sync --extra cu12 --extra nn-extras
411409

412410
### NVCR Container
413411

414-
The recommended PhysicsNeMo Docker image can be pulled from the
412+
The PhysicsNeMo Docker image can be pulled from the
415413
[NVIDIA Container Registry](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/physicsnemo/containers/physicsnemo)
416414
(refer to the NGC registry for the latest tag):
417415

@@ -444,6 +442,13 @@ pip install .
444442
python -c "import physicsnemo; print('PhysicsNeMo version:', physicsnemo.__version__)"
445443
```
446444

445+
For editable installs, testing your changes locally, and contribution workflows,
446+
see the [Customizing PhysicsNeMo](https://docs.nvidia.com/physicsnemo/latest/resources/customization_guide.html)
447+
guide in the documentation. See also the [contributing guidelines](CONTRIBUTING.md)
448+
for pull requests, coding style, and CI, and the
449+
[developer wiki](https://github.com/NVIDIA/physicsnemo/wiki) for community and
450+
contributing overview.
451+
447452
### Building Docker from Source
448453

449454
To build the PhysicsNeMo Docker image:
@@ -504,8 +509,12 @@ PhysicsNeMo is an open-source collaboration, and its success is rooted in commun
504509
contributions to further the field of Physics-ML. Thank you for contributing to the
505510
project so others can build on top of your contributions.
506511

507-
For guidance on contributing to PhysicsNeMo, please refer to the
508-
[contributing guidelines](CONTRIBUTING.md).
512+
For guidance on contributing to PhysicsNeMo, see the [contributing guidelines](CONTRIBUTING.md)
513+
(pull requests, coding style, CI).
514+
For install-from-source steps, editable installs, and testing your changes, see
515+
the [Customizing PhysicsNeMo](https://docs.nvidia.com/physicsnemo/latest/resources/customization_guide.html)
516+
guide in the documentation. For community and contributing overview, see the
517+
[developer wiki](https://github.com/NVIDIA/physicsnemo/wiki).
509518

510519
## Cite PhysicsNeMo
511520

0 commit comments

Comments
 (0)