Skip to content

Adds GLOBE + AirFRANS example#1401

Merged
peterdsharpe merged 336 commits intoNVIDIA:mainfrom
peterdsharpe:psharpe/add-GLOBE
Feb 26, 2026
Merged

Adds GLOBE + AirFRANS example#1401
peterdsharpe merged 336 commits intoNVIDIA:mainfrom
peterdsharpe:psharpe/add-GLOBE

Conversation

@peterdsharpe
Copy link
Copy Markdown
Collaborator

@peterdsharpe peterdsharpe commented Feb 11, 2026

PhysicsNeMo Pull Request

Notes for Reviewers:

PR consists of:

  • GLOBE core model code under ./physicsnemo/models/globe/ (1354 source LOC)
  • Example application to the AirFRANS aerodynamics task ./examples/cfd/external_aerodynamics/globe/airfrans/ (1485 source LOC)
  • Remainder is tests + markdown docs (limited review needed here)

Most of this code is 1:1 direct mapping from the ArXiv paper here: https://arxiv.org/abs/2511.15856 - this may help if there's any confusing theory here.

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@peterdsharpe
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

…own file check

- Removed the `install_graceful_shutdown` function and related signal handling code from `utilities.py`.
- Introduced a shutdown file mechanism in `train.py` to handle graceful shutdown requests.
- Added a new `_compute_loss` function to compute per-field losses without recompilation issues.
- Updated comments and code structure for clarity and maintainability.
@peterdsharpe
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

@peterdsharpe
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

…h retrieval

- Introduced get_physicsnemo_pkg_info in version_check.py to fetch the package version and current git commit hash.
- Updated module.py to utilize the new function for saving metadata.
- Included get_physicsnemo_pkg_info in the __all__ exports of __init__.py.
- Moved the get_physicsnemo_pkg_info function from utilities.py to physicsnemo.core for better organization.
- Updated imports in train.py and utilities.py to reflect the new location of the function.
- Ensured that the function is still accessible for logging package version and git hash.
@peterdsharpe
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

@peterdsharpe
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

@peterdsharpe peterdsharpe added this pull request to the merge queue Feb 26, 2026
Merged via the queue into NVIDIA:main with commit 2aa960b Feb 26, 2026
4 checks passed
@peterdsharpe peterdsharpe deleted the psharpe/add-GLOBE branch February 26, 2026 17:51
nbren12 pushed a commit to nbren12/modulus that referenced this pull request Mar 24, 2026
* comments cleanup

* NumPy-style docstrings

* deduplicate

* merge API

* adds utilities for duplicate detection and tols

* migrate edge extraction to natural home

* Adds sharp/flat fix

* API link

* dead code

* numpy docstrings

* deduplicate

* consolidate sampling

* major simplifications

* fixes for multiple holes

* deduplicate

* sync tests

* docs

* fixes for repo rules

* types fixes

* Adds test fixes

* Part A fixes

* Part C fixes: deduplication

* Part A5: deduplication

* Part D, 3/4: Performance improvements

* Makes this CPU-side

* bvh re-use

* More consistent device preservation to eliminate torch.compile breaks

* Rewrite of 3d vertex manifold check to be fully on the GPU

* Deduplication using FEM weights code

* Branchless voronoi computations

* Fixes for wing weights in newer butterfly scheme

* Docs in examples

* Fixes a few outdated API uses

* Update test assertions for mesh repair and add skip condition for float16 in tolerance tests

* Part C: Reorganization

* Part C: Missing __init__

* Part B: Deduplication

* fix for cell-based gaussian curvature

* Part E: Numerical performance

* Docs fix

* Part A1 and A3 fix.

* Deduplication pass

* Vectorizes primitive generation

* Test deduplication

* Deduplicates unique edge identification

* Consolidation of facet extraction tests

* Further consolidation in test_facet_extraction.py

* vectorized

* Refactor spatial dimension operations: rename embed_in_spatial_dims to embed, enhance documentation, and introduce project function for reducing mesh dimensions.

* Splits embedding and projection tests

* Unifies loops

* Refactor of BVH to use LBVH - goes from O(N) Python loops to O(log N).

* fixes test for first-order composition accuracy

* Consolidates interior angle calculation

* Refactors mesh data handling by enhancing key exclusion logic, optimizing data aggregation methods, and improving error handling for key conflicts in cell and point data conversions.

* formatting

* markdownlint noqa

* Ruff check fixes

* formatting

* Adds pyvista import for type checking

* cleans up no-longer-needed type hint ignores

* Adds perf notes

* visualization fixes in 3D

* Review pass

* __init__.py changes

* formatting

* cleanup

* dtype fix

* formatting

* test fixes

* Deduplication

* fixes missing license header

* tutorial progress

* Update license year

* tutorial sync

* notebook updates

* addresses review comments

* post-review updates

* docs

* Adds a fix for 3D matplotlib viz

* support for 3D data viz

* makes 2D and 3D shading consistent

* Update gradient computation to allow zero minimum neighbors and clarify documentation

* Adds shading

* Adds shading

* Adds a fix for curl on lsq reconstruction.

* viz improvements

* Fixes a null type

* Adds viz

* adds viz

* Adds mesh benchmarks

* format

* license headers

* modifies importlinter

* Initial GLOBE + tests + AirFRANS example addition.

* model compliance

* Adds ability to project data too

* refactors out BoundaryMesh in favor of Mesh

* Updates boundary mesh handling to use cells instead of faces, improving data processing in distributed training. Adjusts related computations and caching for mesh properties.

* dedup

* add cache/ dirs to ignore list

* Adds output dir to gitignores

* Adds uv sync comment first

* Adds requirements

* rewrite of mesh cell normals to remove torch.compile graph break

* Reduce recompilation by early-triggering normal computation caching

* defaulting to scarce, which is faster to train

* Adds an ignore for new MLflow DB-based approach

* default to 4 nodes

* cleanup

* license headers

* validated changes

* simplification

* migrate folders to allow for drivaerml support

* license headers

* jaxtyping fixes

* Validated changes

* Reduces allocation

* Simplifies hyperlayer evaluation syntax for readability

* Adds README.md to airfrans example.

* fixes TODO in docs.

* Adds required hyperlayer evaluation function

* Bugfix in instantiation cache

* minor readability enhancements

* Refactor onto new caching syntax

* formatting

* markdownlint

* adds a few more jaxtyping hints

* reflects new structure of examples

* Disables TF32 in GLOBE tests

* simplify path handling

* minor cleanups

* clearer context logic

* Adds CUDA version detection logic for sync

* path cleanups

* removes need for reduce over ranks

* cleanup

* cleanups

* adds accountname

* migrate to AIRFRANS_DATA_DIR env var

* cleanup

* Refactor onto tensorclass data structure

* fixes dict class

* inexact sync

* Adds OMP_NUM_THREADS

* Adds SLURM env var fallbacks

* simplify

* Refactor GLOBE model structure and update imports to experimental namespace

- Moved GLOBE and related classes (MLP, Pade, ChunkedKernel, MultiscaleKernel) to `physicsnemo.experimental.models.globe`.
- Updated import paths in `dataset.py`, `inference.py`, and `train.py` to reflect the new structure.
- Added new utility functions for TensorDict manipulation in `utilities/tensordict_utils.py`.
- Introduced README documentation for the GLOBE architecture, detailing its mathematical properties and usage.
- Added new files for field kernel and MLP implementations, enhancing the model's capabilities.

* Refactor GLOBE model imports and remove legacy MLP implementation

- Updated import paths for MLP and Pade classes to the new `physicsnemo.nn` module.
- Removed the legacy MLP implementation from the experimental globe module.
- Adjusted the GLOBE model to utilize the new Mlp class from the nn module.
- Cleaned up the __init__.py files to reflect the changes in available classes.

* fixes old MLP API

* Refactor Kernel class to improve network feature handling

- Replaced `network_layer_sizes` with `network_in_features` and `network_out_features` for clarity.
- Updated methods to compute input and output feature sizes directly, enhancing readability and maintainability.
- Adjusted related tensor shape checks to align with the new feature definitions.

* switches to core checkpointing utils

* Adds proper documentation to checkpoint.py

* Switch to using logger

* simplify verbosity control with logging

* Fixes MLFlow too-long error

* fixes serialization bug

* Refactor GLOBE model output structure and enhance feature extraction

- Updated output format to return a Mesh object instead of TensorDict, containing predicted fields in point_data.
- Renamed latent data keys for clarity and consistency.
- Refactored data extraction from source meshes to utilize enriched cell_data, improving feature handling.
- Added a new method for boundary-to-boundary communication, enhancing model capabilities.

* allows cleaner point cloud creation

* cleaner point cloud returns

* Further Mesh incorporation

* simplify splits logic

* more Mesh consolidation

* fix splits

* readability enhancements

* Adds tensordict type hint improvements

* Refactor AirFRANS data handling and GLOBE model input structure

- Updated AirFRANSSample and AirFRANSDataSet to incorporate dimensional constants and streamline global data handling.
- Replaced global scalars and vectors with a unified global_data structure in the GLOBE model, ensuring all conditioning features are nondimensional.
- Enhanced documentation for clarity on the new data structures and their usage.

* Refactor GLOBE model and field kernel data handling

- Unified source and global data structures in the GLOBE model and field kernel, replacing separate scalars and vectors with a single TensorDict for each.
- Updated input handling in tests to accommodate the new data structure, ensuring compatibility with the refactored model.
- Enhanced documentation and comments for clarity on the new data organization and its implications for model functionality.

* Add dynamic attribute access to PythonLogger

- Implemented __getattr__ method in PythonLogger to allow dynamic access to logger attributes, enhancing flexibility in logging operations.

* Refactor GLOBE model and field kernel to use rank-spec TensorDicts

- Replaced output_fields, boundary_condition_n_source_scalars, and boundary_condition_n_source_vectors with rank-spec TensorDicts in the GLOBE model and field kernel.
- Introduced new utility functions for deriving and counting ranks in TensorDicts, enhancing data handling and clarity.
- Updated tests to align with the new data structure, ensuring compatibility and correctness in model inference and kernel operations.

* format

* format

* approved ty changes

* approved ty changes

* approved ty changes

* approved ty changes

* Refactors rank counting algorithm

* Adds docs

* fix ty check errors

* cleaner dict mapping

* Refines documentation for TensorDict structures by removing redundant batch size references and clarifying descriptions in Kernel and GLOBE classes.

* rework to use tensordict

* docs

* pre-commit fix

* Bugfix for 2D unstructured grid handling

* Adds second half of unstructured grid support

* Adds fix for point normals

* Switches back to Python-side rank dict specs for compile compat

* Disambiguates RankDict to be clearer.

* nests the reference length ratios

* silence extraneous logging

* fix recompiling due to length mutation

* fixes for graph breaks

* fix for face centroid randomization

* Adds fix for nested tensordicts

* Adds a config option

* signal handling fixes

* docs

* Pulls out magic numbers

* Switch to physicsnemo knn

* formatting

* Fixes an incorrect docstring, which stated that knn only works in 3D - none of the backends require this; it's dimensionally-generic.

* Enhances the `legendre_polynomials` function documentation and adds input validation. Updates docstring to clarify behavior for non-positive `n` and includes a ValueError for negative inputs. Adjusts implementation to handle edge cases more explicitly.

* typo

* Adds jaxtyping

* Split out cached preprocessing dataset and airfrans specific dataset into separate files

* Update requirements.txt to specify version constraints for dependencies

* adds option to compile bytecode in uv sync

* Switches `profile` to `use_profiler` for readability

* Adds review-requested comment

* scrubs run.sh details

* linter fixes

* remove dangling module outside experimental

* Adds paper link

* consolidate MLFlow logging calls

* delete dangling cuda memory setting

* misc cleanup

* Misc cleanup

* clarifying comment

* partial PR review fixes

* Adds PR review fixes

* Pr review fixes

* removes GLOBE from importlinter, since it's now in experimental

* API changes in running_norm

* update changelog

* Migrates cached_dataset to core, since this will be re-used for 3D cases.

* remove extraneous line

* Refactor training script by removing signal handling and adding shutdown file check

- Removed the `install_graceful_shutdown` function and related signal handling code from `utilities.py`.
- Introduced a shutdown file mechanism in `train.py` to handle graceful shutdown requests.
- Added a new `_compute_loss` function to compute per-field losses without recompilation issues.
- Updated comments and code structure for clarity and maintainability.

* linting

* docs improvements

* docs cleanup + higher recompile limit

* fixes for early termination

* Converts to dict for logging

* lint fix

* Add get_physicsnemo_pkg_info function for package version and git hash retrieval

- Introduced get_physicsnemo_pkg_info in version_check.py to fetch the package version and current git commit hash.
- Updated module.py to utilize the new function for saving metadata.
- Included get_physicsnemo_pkg_info in the __all__ exports of __init__.py.

* Refactor get_physicsnemo_pkg_info function into core module

- Moved the get_physicsnemo_pkg_info function from utilities.py to physicsnemo.core for better organization.
- Updated imports in train.py and utilities.py to reflect the new location of the function.
- Ensured that the function is still accessible for logging package version and git hash.

* Syncs lockfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants