Skip to content

ENH: Reorg tutorials and create PhysicsNeMo workflows#88

Merged
aylward merged 5 commits into
Project-MONAI:mainfrom
aylward:tutorials
Jul 15, 2026
Merged

ENH: Reorg tutorials and create PhysicsNeMo workflows#88
aylward merged 5 commits into
Project-MONAI:mainfrom
aylward:tutorials

Conversation

@aylward

@aylward aylward commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added PhysicsNeMo training and inference workflows for MeshGraphNet and MLP, including manifest-based predictions, single-stage inference, and deformation-field generation.
    • Added new command-line tools for PhysicsNeMo training and inference.
    • Updated tutorials with revised “bring-your-own-data” PhysicsNeMo pipelines for fitting, training, and evaluation.
  • Documentation
    • Updated tutorial cards, script names, variant naming, and recommended run order; clarified data requirements and example invocations.
  • Bug Fixes
    • Enabled mass preservation for non-contrast CT reconstruction.
    • Updated chest segmentation license gating and label mappings.
  • Tests
    • Refreshed tutorial end-to-end coverage to match new tutorial scripts and outputs.

Copilot AI review requested due to automatic review settings July 15, 2026 01:37

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 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@aylward, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c37bdb67-341b-4c1a-8b3d-f7970f9d62a1

📥 Commits

Reviewing files that changed from the base of the PR and between 89060ff and 4e1d06c.

📒 Files selected for processing (1)
  • src/physiotwin4d/segment_chest_total_segmentator.py

Walkthrough

Adds reusable PhysicsNeMo MGN/MLP training and inference workflows, shared data utilities, CLI entry points, BYOD tutorial drivers, segmentation updates, and revised tutorial documentation, numbering, scripts, and end-to-end tests.

Changes

PhysicsNeMo pipeline

Layer / File(s) Summary
Shared contracts and package wiring
src/physiotwin4d/physicsnemo_tools.py, src/physiotwin4d/__init__.py, pyproject.toml
Adds manifest parsing, feature construction, graph/PCA helpers, lazy datasets, workflow exports, optional dependencies, and CLI entry points.
Training workflows and drivers
src/physiotwin4d/workflow_train_physicsnemo.py, src/physiotwin4d/cli/train_physicsnemo.py, tutorials/tutorial_09c_*, tutorials/tutorial_09d_*
Adds shared training orchestration with MGN and MLP variants, checkpoint persistence, CLI configuration, manifest generation, and held-out evaluation.
Inference workflows and drivers
src/physiotwin4d/workflow_infer_physicsnemo.py, src/physiotwin4d/cli/infer_physicsnemo.py, tutorials/tutorial_10c_*, tutorials/tutorial_10d_*
Adds manifest/PCA prediction, deformation-field generation, MGN/MLP inference, CLI modes, and BYOD evaluation.
Tutorial alignment and tests
tutorials/*, tests/test_tutorials.py
Renames tutorial variants and outputs, updates execution coverage, and replaces the older PhysicsNeMo tutorial drivers.
Documentation and segmentation updates
docs/*.rst, tutorials/README.md, src/physiotwin4d/segment_chest_total_segmentator.py
Updates tutorial documentation and run order, and changes tissue taxonomy and academic-license gating.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Driver as BYOD tutorial driver
  participant Train as PhysicsNeMo training workflow
  participant Model as Checkpoint artifacts
  participant Infer as PhysicsNeMo inference workflow
  Driver->>Train: Build manifests and start training
  Train->>Model: Save weights and metadata
  Driver->>Infer: Evaluate held-out subjects
  Infer->>Model: Load weights and normalization assets
  Infer-->>Driver: Return predicted surfaces and statistics
Loading

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.04% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: tutorial reorganization and new PhysicsNeMo workflows.
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

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: 6

🧹 Nitpick comments (8)
tests/test_tutorials.py (1)

83-83: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Align _class_name with the script's TestTools instantiation.

TestTutorial01aHeartGatedCTToUSD uses "tutorial_01a", while the tutorial script instantiates its TestTools with "tutorial_01a_heart_gated_ct_to_usd". Although this works if the baseline directory is strictly named tutorial_01a, the other tests (like tutorial_03_vtk_to_usd) use the full script name for their _class_name. Consider aligning them for consistency (and ensure the baseline directory name matches the update).

💡 Proposed refactor
-    _class_name = "tutorial_01a"
+    _class_name = "tutorial_01a_heart_gated_ct_to_usd"
🤖 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 `@tests/test_tutorials.py` at line 83, Update the _class_name in
TestTutorial01aHeartGatedCTToUSD to match the tutorial script’s TestTools
identifier, “tutorial_01a_heart_gated_ct_to_usd”, and rename or align the
corresponding baseline directory with this value.
docs/tutorials.rst (1)

329-333: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reorder sections to maintain numerical sequence.

The tutorial renaming effectively reassigned the identifiers for the PCA workflows and the VTK-to-USD conversion, leaving "Tutorial 3" physically positioned after "Tutorial 5a" in both the documentation and the test suite. This makes reading the files top-to-bottom somewhat confusing.

  • docs/tutorials.rst#L329-L333: Move the Tutorial 3 documentation block up to appear before Tutorial 4a (above line 235).
  • tests/test_tutorials.py#L196-L205: Move the TestTutorial03VTKToUSD test class up to appear before TestTutorial04aCreateStatisticalModel (above line 126).
🤖 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 `@docs/tutorials.rst` around lines 329 - 333, Reorder the Tutorial 3
documentation block in docs/tutorials.rst to appear before Tutorial 4a, and move
the TestTutorial03VTKToUSD class in tests/test_tutorials.py before
TestTutorial04aCreateStatisticalModel, preserving each block’s contents
unchanged.
tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py (1)

54-85: 📐 Maintainability & Code Quality | 🔵 Trivial

_gating_stage_from_filename and _write_subject_manifest are duplicated verbatim between the MGN and MLP eval tutorials. Same root cause: both files independently implement identical gating-stage parsing and manifest-building logic.

  • tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py#L54-L85: extract these two helpers into physicsnemo_tools.py (already imported elsewhere as pnt) and import from there.
  • tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py#L54-L85: import the same shared helpers instead of redefining them.
🤖 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/tutorial_10c_byod_eval_physicsnemo_mgn.py` around lines 54 - 85,
Extract _gating_stage_from_filename and _write_subject_manifest from
tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py lines 54-85 into the shared
physicsnemo_tools.py module, preserving their behavior and required
dependencies; update the MGN tutorial to use the shared helpers through its
existing pnt import. In tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py
lines 54-85, remove the duplicate helper definitions and import/use the same
shared helpers instead.

Source: Coding guidelines

src/physiotwin4d/cli/train_physicsnemo.py (1)

13-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

workflow: object forces # type: ignore[attr-defined] on every call.

Both WorkflowTrainPhysicsNeMoMGN and WorkflowTrainPhysicsNeMoMLP inherit the same setters from WorkflowTrainPhysicsNeMo; typing the parameter as that shared base removes the need for the ignore comments and gives mypy real checking here, better matching the "full type hints compatible with strict mypy" convention.

♻️ Proposed fix
+from ..workflow_train_physicsnemo import WorkflowTrainPhysicsNeMo
+
-def _apply_common(workflow: object, args: argparse.Namespace) -> None:
+def _apply_common(workflow: WorkflowTrainPhysicsNeMo, args: argparse.Namespace) -> None:
     """Apply the shared tuning setters when supplied on the command line."""
     if args.epochs is not None:
-        workflow.set_epochs(args.epochs)  # type: ignore[attr-defined]
+        workflow.set_epochs(args.epochs)
     if args.batch_size is not None:
-        workflow.set_batch_size(args.batch_size)  # type: ignore[attr-defined]
+        workflow.set_batch_size(args.batch_size)
     if args.learning_rate is not None:
-        workflow.set_learning_rate(args.learning_rate)  # type: ignore[attr-defined]
+        workflow.set_learning_rate(args.learning_rate)
     if args.cache_size is not None:
-        workflow.set_cache_size(args.cache_size)  # type: ignore[attr-defined]
+        workflow.set_cache_size(args.cache_size)
As per coding guidelines, "use full type hints compatible with strict mypy."
🤖 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 `@src/physiotwin4d/cli/train_physicsnemo.py` around lines 13 - 22, Update the
_apply_common workflow parameter from object to the shared
WorkflowTrainPhysicsNeMo base type, importing that class from the established
module. Remove the # type: ignore[attr-defined] comments so mypy checks the
inherited setter calls directly.

Source: Coding guidelines

src/physiotwin4d/workflow_train_physicsnemo.py (3)

148-172: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Repeated < 1 / <= 0 validation pattern across setters.

set_epochs, set_batch_size, set_cache_size (and the subclass setters for processor_size, hidden_dim, num_layers, layer_size) all repeat the same "raise ValueError if below threshold" pattern. A small _require_at_least(name, value, minimum) helper would remove the repetition.

🤖 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 `@src/physiotwin4d/workflow_train_physicsnemo.py` around lines 148 - 172,
Introduce a shared _require_at_least(name, value, minimum) validation helper and
update set_epochs, set_batch_size, set_cache_size, and the subclass setters for
processor_size, hidden_dim, num_layers, and layer_size to use it, preserving
each setter’s existing thresholds, error conditions, and assignments.

50-53: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Importing the private _Sample across module boundaries.

_Sample is underscore-prefixed in physicsnemo_tools.py, signaling internal use, yet it's imported and used directly here as a public-facing type (list[_Sample]). Consider exposing it (drop the leading underscore) or having physicsnemo_tools provide a factory so the private-name convention isn't broken across files.

🤖 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 `@src/physiotwin4d/workflow_train_physicsnemo.py` around lines 50 - 53, Stop
importing and exposing the private _Sample type from
workflow_train_physicsnemo.py; rename or otherwise expose the sample type
through physicsnemo_tools.py, then update its definition and all references,
including the list[_Sample] annotation, to use the public symbol consistently.

496-509: 🚀 Performance & Scalability | 🔵 Trivial

Unbounded accumulation of intermittent checkpoint files.

A full _stage_model_epoch_{n}.pt checkpoint is written every rmse_log_interval (default 100) epochs with no retention/cleanup. For epochs=10000 (as in the MLP tutorial) that's ~100 checkpoint files persisted for the life of the run. Consider keeping only the last N or the best-by-val-RMSE checkpoint.

🤖 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 `@src/physiotwin4d/workflow_train_physicsnemo.py` around lines 496 - 509, Limit
retention of intermittent checkpoints created in the training loop around
torch.save and the _stage_model_epoch naming. Track saved checkpoint paths and
remove older files once the configured retention count is exceeded, keeping only
the most recent N (or an explicitly selected best-by-val-RMSE checkpoint);
preserve the existing checkpoint logging and final model-saving behavior.
tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

_gating_stage_from_filename and _write_subject_manifest are duplicated verbatim across the two tutorials. As per coding guidelines, "**/*_tools.py: Refer to *_tools.py files for commonly used routines" — these are prime candidates to move into physicsnemo_tools.py (already imported as pnt by the workflows) and call from both tutorials, avoiding drift if one copy is fixed and the other isn't.

  • tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py#L49-85: replace the local _gating_stage_from_filename/_write_subject_manifest with imports from a shared helper.
  • tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py#L50-86: same — replace the local copies with the same shared helper.
🤖 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/tutorial_09c_byod_train_physicsnemo_mgn.py` at line 1, Move the
shared _gating_stage_from_filename and _write_subject_manifest implementations
into physicsnemo_tools.py, exposing them through the existing pnt import. Remove
both local helper definitions from tutorials
tutorial_09c_byod_train_physicsnemo_mgn.py and
tutorial_09d_byod_train_physicsnemo_mlp.py, and update each workflow to call the
shared pnt helpers while preserving current behavior.

Source: Coding guidelines

🤖 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 `@src/physiotwin4d/physicsnemo_tools.py`:
- Around line 161-190: Update mesh_to_edge_index to triangulate the input
PolyData before reading poly.faces, ensuring extract_surface outputs with quads
or other polygons are converted to a true triangle mesh. Preserve the existing
edge construction and undirected conversion after triangulation.

In `@src/physiotwin4d/workflow_train_physicsnemo.py`:
- Around line 263-290: Update _load_subjects to detect duplicate
manifest.subject_id values before assigning to subjects, including duplicates
within a split and across train and val manifests. Raise a clear ValueError
identifying the duplicated subject and its conflicting split instead of silently
overwriting the existing entry.
- Around line 687-716: Update the MeshGraphNet construction in _build_model to
pass self.num_layers as num_layers_edge_encoder, ensuring the configured layer
count applies to the edge encoder as well as the other encoder, processor, and
decoder components.
- Line 1: Make surface-point ordering explicit across the training workflow and
reconstruct_reference_points(): do not rely on
extract_surface(algorithm="dataset_surface") preserving PCA topology. Use
vtkOriginalPointIds to remap extracted points into the PCA basis order, or
consistently replace both extraction paths with an ordering-preserving method,
ensuring the shared mean-shape and PCA coordinates remain aligned.

In `@tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py`:
- Around line 31-36: Update the “Extra Install Required” note in the tutorial
module docstring to state that Python 3.11 or newer is required for the
physiotwin4d[physicsnemo] installation, matching the corresponding note in the
sibling MLP tutorial.

In `@tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py`:
- Line 93: Update the OUTPUT_DIR assignment in the tutorial to use a
tutorial-specific directory name, matching the sibling MGN tutorial’s naming
convention (for example, an output_physicsnemo_mlp-style directory) instead of
the generic "output" path, while preserving the existing TUTORIALS_DIR base.

---

Nitpick comments:
In `@docs/tutorials.rst`:
- Around line 329-333: Reorder the Tutorial 3 documentation block in
docs/tutorials.rst to appear before Tutorial 4a, and move the
TestTutorial03VTKToUSD class in tests/test_tutorials.py before
TestTutorial04aCreateStatisticalModel, preserving each block’s contents
unchanged.

In `@src/physiotwin4d/cli/train_physicsnemo.py`:
- Around line 13-22: Update the _apply_common workflow parameter from object to
the shared WorkflowTrainPhysicsNeMo base type, importing that class from the
established module. Remove the # type: ignore[attr-defined] comments so mypy
checks the inherited setter calls directly.

In `@src/physiotwin4d/workflow_train_physicsnemo.py`:
- Around line 148-172: Introduce a shared _require_at_least(name, value,
minimum) validation helper and update set_epochs, set_batch_size,
set_cache_size, and the subclass setters for processor_size, hidden_dim,
num_layers, and layer_size to use it, preserving each setter’s existing
thresholds, error conditions, and assignments.
- Around line 50-53: Stop importing and exposing the private _Sample type from
workflow_train_physicsnemo.py; rename or otherwise expose the sample type
through physicsnemo_tools.py, then update its definition and all references,
including the list[_Sample] annotation, to use the public symbol consistently.
- Around line 496-509: Limit retention of intermittent checkpoints created in
the training loop around torch.save and the _stage_model_epoch naming. Track
saved checkpoint paths and remove older files once the configured retention
count is exceeded, keeping only the most recent N (or an explicitly selected
best-by-val-RMSE checkpoint); preserve the existing checkpoint logging and final
model-saving behavior.

In `@tests/test_tutorials.py`:
- Line 83: Update the _class_name in TestTutorial01aHeartGatedCTToUSD to match
the tutorial script’s TestTools identifier,
“tutorial_01a_heart_gated_ct_to_usd”, and rename or align the corresponding
baseline directory with this value.

In `@tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py`:
- Line 1: Move the shared _gating_stage_from_filename and
_write_subject_manifest implementations into physicsnemo_tools.py, exposing them
through the existing pnt import. Remove both local helper definitions from
tutorials tutorial_09c_byod_train_physicsnemo_mgn.py and
tutorial_09d_byod_train_physicsnemo_mlp.py, and update each workflow to call the
shared pnt helpers while preserving current behavior.

In `@tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py`:
- Around line 54-85: Extract _gating_stage_from_filename and
_write_subject_manifest from tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py
lines 54-85 into the shared physicsnemo_tools.py module, preserving their
behavior and required dependencies; update the MGN tutorial to use the shared
helpers through its existing pnt import. In
tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py lines 54-85, remove the
duplicate helper definitions and import/use the same shared helpers instead.
🪄 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: d2fd81c3-9c0c-495d-b993-42e9ae8a3795

📥 Commits

Reviewing files that changed from the base of the PR and between 9089787 and 0789fb2.

📒 Files selected for processing (29)
  • docs/architecture.rst
  • docs/index.rst
  • docs/quickstart.rst
  • docs/tutorials.rst
  • pyproject.toml
  • src/physiotwin4d/__init__.py
  • src/physiotwin4d/cli/infer_physicsnemo.py
  • src/physiotwin4d/cli/train_physicsnemo.py
  • src/physiotwin4d/physicsnemo_tools.py
  • src/physiotwin4d/workflow_infer_physicsnemo.py
  • src/physiotwin4d/workflow_train_physicsnemo.py
  • tests/test_tutorials.py
  • tutorials/README.md
  • tutorials/tutorial_01a_heart_gated_ct_to_usd.py
  • tutorials/tutorial_01b_lung_gated_ct_to_usd.py
  • tutorials/tutorial_02_ct_to_vtk.py
  • tutorials/tutorial_03_vtk_to_usd.py
  • tutorials/tutorial_04a_heart_create_statistical_model.py
  • tutorials/tutorial_05a_heart_fit_statistical_model_to_patient.py
  • tutorials/tutorial_06_reconstruct_highres_4d_ct.py
  • tutorials/tutorial_08cd_byod_fit_model_to_patients.py
  • tutorials/tutorial_09a_cardiac_train_physicsnemo_mgn.py
  • tutorials/tutorial_09b_cardiac_train_physicsnemo_mlp.py
  • tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py
  • tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py
  • tutorials/tutorial_10a_cardiac_eval_physicsnemo_mgn.py
  • tutorials/tutorial_10b_cardiac_eval_physicsnemo_mlp.py
  • tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py
  • tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py
💤 Files with no reviewable changes (4)
  • tutorials/tutorial_09b_cardiac_train_physicsnemo_mlp.py
  • tutorials/tutorial_09a_cardiac_train_physicsnemo_mgn.py
  • tutorials/tutorial_10b_cardiac_eval_physicsnemo_mlp.py
  • tutorials/tutorial_10a_cardiac_eval_physicsnemo_mgn.py

Comment thread src/physiotwin4d/physicsnemo_tools.py
Comment thread src/physiotwin4d/workflow_train_physicsnemo.py
Comment thread src/physiotwin4d/workflow_train_physicsnemo.py
Comment thread src/physiotwin4d/workflow_train_physicsnemo.py
Comment thread tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py
Comment thread tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 03:24

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 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

🤖 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 `@src/physiotwin4d/segment_chest_total_segmentator.py`:
- Line 307: Update the docstring at the start of segmentation_method to
accurately state that the method runs the total and body tasks, with body
providing the skin outline rather than filling gaps, and additionally runs
heartchambers_highres and tissue_4_types when has_academic_license is present.
Keep the description factual and consistent with the method’s current behavior.
🪄 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: b4b7a16f-2981-4c2e-b0db-58be2d8be95c

📥 Commits

Reviewing files that changed from the base of the PR and between 0789fb2 and 89060ff.

📒 Files selected for processing (9)
  • src/physiotwin4d/physicsnemo_tools.py
  • src/physiotwin4d/segment_chest_total_segmentator.py
  • src/physiotwin4d/workflow_infer_physicsnemo.py
  • src/physiotwin4d/workflow_train_physicsnemo.py
  • tutorials/tutorial_05a_heart_fit_statistical_model_to_patient.py
  • tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py
  • tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py
  • tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py
  • tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py
🚧 Files skipped from review as they are similar to previous changes (8)
  • tutorials/tutorial_09c_byod_train_physicsnemo_mgn.py
  • tutorials/tutorial_10d_byod_eval_physicsnemo_mlp.py
  • tutorials/tutorial_10c_byod_eval_physicsnemo_mgn.py
  • tutorials/tutorial_09d_byod_train_physicsnemo_mlp.py
  • src/physiotwin4d/physicsnemo_tools.py
  • tutorials/tutorial_05a_heart_fit_statistical_model_to_patient.py
  • src/physiotwin4d/workflow_train_physicsnemo.py
  • src/physiotwin4d/workflow_infer_physicsnemo.py

Comment thread src/physiotwin4d/segment_chest_total_segmentator.py
Copilot AI review requested due to automatic review settings July 15, 2026 03:33

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.

Copilot AI review requested due to automatic review settings July 15, 2026 03:40

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.

@aylward aylward merged commit 34f3f97 into Project-MONAI:main Jul 15, 2026
9 of 10 checks passed
@aylward aylward deleted the tutorials branch July 15, 2026 04:00
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