Skip to content

Correct custom transform documentation - #1493

Merged
fepegar merged 4 commits into
mainfrom
fepegar/v2-transform-docs
Jul 13, 2026
Merged

Correct custom transform documentation#1493
fepegar merged 4 commits into
mainfrom
fepegar/v2-transform-docs

Conversation

@fepegar

@fepegar fepegar commented Jul 13, 2026

Copy link
Copy Markdown
Member

[Generated by a coding agent]


Summary

  • correct the v2 custom-transform hook names and batch argument types
  • explain automatic Subject/SubjectsBatch wrapping and 4D-to-5D tensor changes
  • document batched metadata, per-instance behavior, and subject-wise migration
  • remove the unsafe direct apply_transform replay example

Validation

  • documentation code blocks
  • Zensical build
  • Ruff documentation lint

Stack (merge bottom-up)

  1. Correct custom transform documentation #1493 — documentation corrections (this PR)
  2. #1494 — lossless subject batching
  3. #1495 — exact transform parameter replay
  4. #1496 — subject mapping adapters and examples

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: baf5f11a-f67c-44dc-804e-6be849fa9160
Copilot AI review requested due to automatic review settings July 13, 2026 15:44
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📖 Docs Preview

Preview of the documentation for this PR:

🔗 https://smokeshow.helpmanual.io/4m3c1l0i3269293o6w67/

Built from f6c059e

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects and expands TorchIO v2 documentation around custom transforms and batching, aligning migration and transform-concepts docs with the v2 hook architecture and batched metadata behavior.

Changes:

  • Document v2 custom-transform hooks (make_params(batch) / apply_transform(batch, params)) and the automatic Subject↔SubjectsBatch wrapping.
  • Add guidance and examples for 4D→5D tensor handling, batched metadata, and per-instance vs shared behavior.
  • Remove the unsafe “replay by calling apply_transform directly” example and replace it with safer guidance.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/get-started/migration.md Adds/clarifies migration guidance for rewriting custom transforms to the v2 batch hook model, including metadata and per-subject escape hatches.
docs/concepts/transforms.md Updates transform design documentation with a v2-aligned custom transform example and clarifies batching/metadata semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/concepts/transforms.md Outdated
Comment thread docs/concepts/transforms.md
Comment thread docs/get-started/migration.md
fepegar added 3 commits July 13, 2026 22:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: baf5f11a-f67c-44dc-804e-6be849fa9160
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: baf5f11a-f67c-44dc-804e-6be849fa9160
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: baf5f11a-f67c-44dc-804e-6be849fa9160

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@fepegar
fepegar merged commit 774f079 into main Jul 13, 2026
31 checks passed
@fepegar
fepegar deleted the fepegar/v2-transform-docs branch July 13, 2026 21:34
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