You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This PR adds three Point Transformer attention building blocks — LocalPointTransformerBlock, LocalTokenCrossAttentionBlock, and ResidualMLP — implementing k-NN-local grouped vector attention with optional DiT-style AdaLN/AdaLN-Zero conditioning, directly into the production physicsnemo/nn/module/ path.
All three classes inherit from torch.nn.Module directly, violating MOD-001, which requires all layers in this codebase to use physicsnemo.Module for serialization, versioning, and registry support.
The classes are placed in production without the required CI test suite (MOD-002a, MOD-008b, MOD-008c): non-regression tests against .pth reference data and .mdlus checkpoint loading tests are absent.
pos_proj is hardcoded to a 3-dimensional linear input while the documented API accepts arbitrary (N, D) coordinates, causing a silent runtime failure for non-3D inputs.
New file implementing three Point Transformer attention blocks; has multiple standard violations: classes inherit from nn.Module instead of physicsnemo.Module (MOD-001), pos_proj hardcoded to 3D coordinates while API documents arbitrary D, missing forward shape validation (MOD-005), and missing jaxtyping annotations (MOD-006)
New test file with good coverage of shapes, gradients, edge cases, and batch masking, but missing required non-regression tests against .pth reference data (MOD-008b) and checkpoint loading tests via physicsnemo.Module.from_checkpoint() (MOD-008c)
physicsnemo/nn/init.py
Adds imports for the three new classes from point_transformer_attention; straightforward and correctly placed
physicsnemo/nn/module/init.py
Re-exports the three new classes; no issues
CHANGELOG.md
Adds a well-written changelog entry describing the new attention blocks; no issues
Comments Outside Diff (1)
physicsnemo/nn/module/point_transformer_attention.py, line 568-600 (link)
self.conditioning is called twice when context_cond is None
In LocalTokenCrossAttentionBlock.forward, when context_cond is None, kv_source falls back to cond and self.conditioning is called a second time with the exact same input. This is redundant computation that could instead reuse the already-computed result from the first call. Consider caching the full 5-way output and slicing the needed chunks, rather than invoking the MLP a second time.
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
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.