Update transolver to comply with model standards#1316
Merged
coreyjadams merged 15 commits intoNVIDIA:mainfrom Feb 5, 2026
Merged
Update transolver to comply with model standards#1316coreyjadams merged 15 commits intoNVIDIA:mainfrom
coreyjadams merged 15 commits intoNVIDIA:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR updates the Transolver model to comply with PhysicsNeMo model implementation standards by adding comprehensive documentation, type annotations, and validation logic.
Major changes:
- Added complete NumPy-style docstrings with proper sections (Parameters, Forward, Outputs, Examples) across all model classes and functions
- Added jaxtyping type annotations for all tensor arguments following MOD-006
- Added input validation with
torch.compiler.is_compiling()guards in main forward methods following MOD-005 - Added high-level comments explaining complex tensor operations following MOD-003k
- Updated
pyproject.tomlto ignore F722 (allows jaxtyping syntax) - Changed docstring prefixes from
"""tor"""for LaTeX compatibility following MOD-003b
Critical issues found:
MLPandTransolver_blockclasses inherit fromnn.Moduleinstead ofphysicsnemo.Module, violating MOD-001. These classes should be updated to inherit fromphysicsnemo.Moduleto ensure access to serialization, versioning, and registry features.- Missing input validation in
MLP.forward()andTransolver_block.forward()methods (MOD-005 requirement)
Positive aspects:
- Excellent documentation quality with clear examples and cross-references
- Proper use of LaTeX math notation for tensor shapes
- Good high-level comments in complex tensor operations
- Consistent formatting and structure across all files
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| physicsnemo/models/transolver/transolver.py | 3/5 | Added comprehensive docstrings with jaxtyping annotations, input validation, and high-level comments. Found critical issue: MLP and Transolver_block inherit from nn.Module instead of physicsnemo.Module (violates MOD-001). |
| physicsnemo/models/transolver/Physics_Attention.py | 4/5 | Added comprehensive docstrings with proper sections, jaxtyping annotations, and input validation. All classes correctly inherit from nn.Module (appropriate for reusable layers per MOD-000a). |
| physicsnemo/models/transolver/Embedding.py | 4/5 | Added complete docstrings with proper NumPy-style sections, jaxtyping annotations, LaTeX math notation for tensor shapes, and Examples sections. All classes correctly inherit from nn.Module. |
| pyproject.toml | 5/5 | Added F722 to ruff ignore list (allows jaxtyping syntax) and removed trailing whitespace. Changes are appropriate for supporting jaxtyping annotations. |
CharlelieLrt
requested changes
Jan 26, 2026
Collaborator
CharlelieLrt
left a comment
There was a problem hiding this comment.
Mostly looks good, just a few minor things about formatting and such.
One bigger question though:
- For
Physics_Attention.py, could it be moved tophysicsnemo/nn, ither with other attention layers inphysicsnemo/nn/attention_layers.py, or just in its own module? - Same question for
Embeddings.py
ktangsali
approved these changes
Jan 27, 2026
CharlelieLrt
reviewed
Feb 4, 2026
CharlelieLrt
reviewed
Feb 4, 2026
CharlelieLrt
approved these changes
Feb 4, 2026
Collaborator
CharlelieLrt
left a comment
There was a problem hiding this comment.
LGTM, really nice you could reuse some of the existing layers!
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
1 similar comment
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
1 similar comment
Collaborator
Author
|
/blossom-ci |
coreyjadams
added a commit
to coreyjadams/physicsnemo
that referenced
this pull request
Feb 6, 2026
* Update transolver to comply with model standards * Updating transolver for more compliance issues. * Finish most transolver updates. * Use ... for abstract method * Updates for docstrings, typehints consistency. * Address checkpoint restore issues from transolver. Update geotransolver for latest changes * Update license headers * Fix one more license check * fix mlp tests
nbren12
pushed a commit
to nbren12/modulus
that referenced
this pull request
Mar 24, 2026
* Update transolver to comply with model standards * Updating transolver for more compliance issues. * Finish most transolver updates. * Use ... for abstract method * Updates for docstrings, typehints consistency. * Address checkpoint restore issues from transolver. Update geotransolver for latest changes * Update license headers * Fix one more license check * fix mlp tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PhysicsNeMo Pull Request
Description
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.