Skip to content

ENH: Track physicsnemo_mgn_heart weights via Git LFS#95

Merged
aylward merged 1 commit into
Project-MONAI:mainfrom
aylward:heart_and_lung_model
Jul 23, 2026
Merged

ENH: Track physicsnemo_mgn_heart weights via Git LFS#95
aylward merged 1 commit into
Project-MONAI:mainfrom
aylward:heart_and_lung_model

Conversation

@aylward

@aylward aylward commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added updated network weights and supporting geometry assets for the PhysicsNeMo heart MeshGraphNet tutorial.
    • Added model metadata describing inputs, outputs, architecture, training settings, and normalization parameters.
    • Added shared edge features and connectivity data required by the tutorial workflow.
  • Bug Fixes

    • Refreshed model and preprocessing assets to ensure the tutorial uses the latest compatible artifacts.
  • Chores

    • Improved asset tracking and handling for large tutorial files.

Copilot AI review requested due to automatic review settings July 21, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Walkthrough

Updates Git LFS tracking rules and refreshes the heart MeshGraphNet model assets, including model metadata, geometry, PCA files, and shared edge data.

Changes

Heart model assets

Layer / File(s) Summary
Network weight tracking rules
.gitattributes, .gitignore
Adds Git LFS handling for heart model artifacts and adjusts ignore rules to preserve the heart network weights directory.
Heart model asset bundle
tutorials/network_weights/physicsnemo_mgn_heart/*
Updates LFS pointers for model and geometry assets, adds shared edge feature and index pointers, and adds MeshGraphNet training metadata.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: tracking the physicsnemo_mgn_heart weights with Git LFS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
tutorials/network_weights/physicsnemo_mgn_heart/pca_model.json

ast-grep skipped this file: it is too large to scan (623801511 bytes)

🔧 Checkov (3.3.8)
tutorials/network_weights/physicsnemo_mgn_heart/pca_model.json

Checkov skipped this file: it is too large to scan (623801511 bytes)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.gitattributes (1)

4-7: 🩺 Stability & Availability | 🔵 Trivial

Confirm the referenced LFS objects are uploaded.

These files are pointer stubs; verify a clean checkout can run git lfs pull and load the model, PCA, mesh, and edge assets before merging.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitattributes around lines 4 - 7, Verify that every Git LFS asset matched
by the physicsnemo_mgn_heart entries in .gitattributes has been uploaded and is
retrievable: perform a clean checkout, run git lfs pull, and confirm the model,
PCA, mesh, and edge files load successfully before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@tutorials/network_weights/physicsnemo_mgn_heart/mgn_stage_model_metadata.json`:
- Line 80: Replace the machine-specific absolute value in the resumed_from
metadata field with a portable repository-relative checkpoint path, checkpoint
basename, or stable run ID, while preserving the metadata’s reference to the
resumed checkpoint.

---

Nitpick comments:
In @.gitattributes:
- Around line 4-7: Verify that every Git LFS asset matched by the
physicsnemo_mgn_heart entries in .gitattributes has been uploaded and is
retrievable: perform a clean checkout, run git lfs pull, and confirm the model,
PCA, mesh, and edge files load successfully before merging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 619f3bed-7fbe-4d02-9ade-41ef90865d8e

📥 Commits

Reviewing files that changed from the base of the PR and between e31c8af and a7e05b3.

📒 Files selected for processing (9)
  • .gitattributes
  • .gitignore
  • tutorials/network_weights/physicsnemo_mgn_heart/mgn_stage_model.pt
  • tutorials/network_weights/physicsnemo_mgn_heart/mgn_stage_model_metadata.json
  • tutorials/network_weights/physicsnemo_mgn_heart/pca_mean.vtu
  • tutorials/network_weights/physicsnemo_mgn_heart/pca_mean_surface.vtp
  • tutorials/network_weights/physicsnemo_mgn_heart/pca_model.json
  • tutorials/network_weights/physicsnemo_mgn_heart/shared_edge_features.pt
  • tutorials/network_weights/physicsnemo_mgn_heart/shared_edge_index.pt

],
"displacement_scale": 21.72310447692871,
"displacement_convention": "Option B: relative to subject reference surface",
"resumed_from": "C:\\src\\Projects\\PhysioTwin4D\\physiotwin4d\\tutorials\\output\\tutorial_09_byod_mgn_2\\mgn_stage_model_epoch_00200.pt",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the machine-specific absolute checkpoint path.

Store a repository-relative path, checkpoint basename, or stable run ID instead of committing C:\src\Projects\...; the current value is not portable.

Proposed fix
-  "resumed_from": "C:\\src\\Projects\\PhysioTwin4D\\physiotwin4d\\tutorials\\output\\tutorial_09_byod_mgn_2\\mgn_stage_model_epoch_00200.pt",
+  "resumed_from": "mgn_stage_model_epoch_00200.pt",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"resumed_from": "C:\\src\\Projects\\PhysioTwin4D\\physiotwin4d\\tutorials\\output\\tutorial_09_byod_mgn_2\\mgn_stage_model_epoch_00200.pt",
"resumed_from": "mgn_stage_model_epoch_00200.pt",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@tutorials/network_weights/physicsnemo_mgn_heart/mgn_stage_model_metadata.json`
at line 80, Replace the machine-specific absolute value in the resumed_from
metadata field with a portable repository-relative checkpoint path, checkpoint
basename, or stable run ID, while preserving the metadata’s reference to the
resumed checkpoint.

@aylward
aylward merged commit c8543c0 into Project-MONAI:main Jul 23, 2026
10 checks passed
@aylward
aylward deleted the heart_and_lung_model branch July 23, 2026 11:52
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.

2 participants