Skip to content

2.0.0 rc rebase 2#1484

Merged
ktangsali merged 17 commits intomainfrom
2.0.0-rc-rebase-2
Mar 11, 2026
Merged

2.0.0 rc rebase 2#1484
ktangsali merged 17 commits intomainfrom
2.0.0-rc-rebase-2

Conversation

@ktangsali
Copy link
Collaborator

PhysicsNeMo Pull Request

Description

2nd Rebase of RC Branch into Main

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.

@ktangsali ktangsali requested a review from coreyjadams March 10, 2026 22:35
@ktangsali ktangsali requested a review from megnvidia as a code owner March 10, 2026 22:35
@ktangsali
Copy link
Collaborator Author

/blossom-ci

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR is the second rebase of the 2.0.0 release-candidate branch into main. It bundles several targeted fixes and documentation improvements across the diffusion, model, and checkpoint modules, with the most notable code changes being a breaking API rename and a bug fix in the GALE attention block.

Key changes:

  • GALE residual connection bug fix (gale.py): The pre-norm Transformer residual connection now correctly adds the attention output to the unnormalized input fx[i] instead of the normalized normed_inputs[i]. This is a meaningful correctness fix confirmed by updated test-data .pth files.
  • DPSDenoiserDPSScorePredictor rename: The class no longer inherits from Denoiser; it is now a plain callable that implements the Predictor protocol. The __init__.py public API has been updated accordingly, but no backward-compatibility alias is provided — this is a breaking change.
  • Inference-mode guards: New RuntimeError guards added to DPSScorePredictor.__call__, ModelConsistencyDPSGuidance.__call__, and DataConsistencyDPSGuidance.__call__ to fail fast when called inside torch.inference_mode() (which prevents autograd from working). The error message wording is slightly ambiguous.
  • inference_on_vtk.py tensor construction: Square brackets removed from torch.tensor([air_density]) / torch.tensor([stream_velocity]), changing the result from a 1-D (1,) tensor to a 0-D scalar tensor. This may break downstream batching logic.
  • Docstring maintenance: Numerous RST cross-reference fixes (DSMLossMSEDSMLoss), LaTeX subscript escaping, and note-block reformatting throughout the diffusion and model subpackages.
  • New checkpoint doctest examples and expanded API docs for mesh, datapipes, and diffusion modules.

Important Files Changed

Filename Overview
physicsnemo/experimental/models/geotransolver/gale.py Bug fix in GALE_block: residual connection now correctly uses unnormalized fx[i] instead of normed_inputs[i], matching standard pre-norm Transformer semantics. Test data files updated to reflect corrected model outputs.
physicsnemo/diffusion/guidance/dps_guidance.py Class renamed DPSDenoiser→DPSScorePredictor (no longer inherits Denoiser base class); new inference-mode guard added to three call methods; docstring and math notation updated (γ→ρ, Γ; variance→covariance).
physicsnemo/diffusion/guidance/init.py DPSDenoiser removed from exports and replaced with DPSScorePredictor. Breaking public API change with no backward compatibility alias.
physicsnemo/utils/checkpoint.py Docstring improvements: clarified model naming behavior and added runnable doctest examples for save_checkpoint and load_checkpoint. No logic changes.
examples/cfd/external_aerodynamics/transformer_models/src/inference_on_vtk.py air_density and stream_velocity tensors changed from torch.tensor([scalar]) (shape (1,)) to torch.tensor(scalar) (shape ()). Shape change may affect downstream batching behavior.
test/diffusion/test_preconditioners.py Added two new pytest fixtures: deterministic_settings (handles CUDA/cuDNN flags safely on CPU-only builds) and tolerances (returns per-device tolerance levels). Clean, well-guarded implementations.

Last reviewed commit: eb795b8

CharlelieLrt and others added 13 commits March 10, 2026 23:05
Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
* Remove 'perf' extra from physicsnemo installation because NGC containers already include transformer-engine

* update deterministic settings
* Add wandb to requirements

* Modify requirements for trimesh and add wandb

Updated trimesh version constraint and added wandb.
* Fix attention and turn off feature broadcasting.

* Fix scalar loading shapes

* Update volume.yaml

Ensure the volume example works out of the box.

* Fix Geotransolver inference tests
* Adds mesh docs on top of RC branch

* Update docs/mesh/boundaries.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Apply suggestions from code review

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Refine documentation for mesh geometry functions to clarify usage and API exposure for advanced cases.

* better subdivision descriptions

* clearer docs

---------

Co-authored-by: megnvidia <mmiranda@nvidia.com>
* Update API docs and structure.

* clean-up and re-organization of docs

* fix based on new api

* remove unused sections

* update image paths

* Update docs/api/models/diffusion.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/models/operators.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/models/weather.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.core.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.diffusion.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.diffusion.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* Update docs/api/physicsnemo.utils.rst

Co-authored-by: megnvidia <mmiranda@nvidia.com>

* fix formatting

---------

Co-authored-by: Kaustubh Tangsali <71059996+ktangsali@users.noreply.github.com>
Co-authored-by: Kaustubh Tangsali <ktangsali@nvidia.com>
Co-authored-by: megnvidia <mmiranda@nvidia.com>
Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
* minor edits to the install guide

* add more details

* minor doc fix

* add transolver to the api index
* New API docs for diffusion

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Some fixes in nested API references

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Revert some changes

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Some fixes

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Some clarifications in introduction.rst

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Some clarification in diffusion models.rst

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Fixed note sections in preconditioners.py

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Fix some broken short-form refs in losses.py

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Updated DPSScorePredictor class name in samplers.rst

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Enhance clarity and structure of introduction section

Refactor introduction section for clarity and readability. Improve formatting and organization of key concepts related to the PhysicsNeMo diffusion framework.

* Refactor metrics.rst for improved clarity and formatting

Reformatted the description of the module to use bullet points for clarity. Adjusted wording for consistency and readability.

* Fix punctuation and enhance clarity in models.rst

Corrected punctuation and improved clarity in the documentation.

* Addressed PR comments

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

---------

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
Co-authored-by: megnvidia <mmiranda@nvidia.com>
Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
* Trying again with datapipes check in

* Update docs/api/datapipes/physicsnemo.datapipes.cae.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.cae.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/api/datapipes/physicsnemo.datapipes.transforms.rst

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Resolve api commits for datapipes

* Remove old datapipes api

* Add link to the datapipe docs.

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Improved docs for module.py

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Fix in save_checkpoint and load_checkpoint docstrings

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Addressed PR comments

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Improvements in docs

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

* Moved down section about static capture in physicsnemo.utils.rst

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>

---------

Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
@ktangsali
Copy link
Collaborator Author

/blossom-ci

@ktangsali
Copy link
Collaborator Author

/blossom-ci

@ktangsali ktangsali merged commit 26fcdce into main Mar 11, 2026
4 checks passed
@ktangsali ktangsali deleted the 2.0.0-rc-rebase-2 branch March 11, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants