Skip to content

fix: correct typo in PerceptualLoss MedicalNet warning message (Fixes #8923)#8924

Open
rtmalikian wants to merge 1 commit into
Project-MONAI:devfrom
rtmalikian:fix/issue-8923-perceptual-loss-typo
Open

fix: correct typo in PerceptualLoss MedicalNet warning message (Fixes #8923)#8924
rtmalikian wants to merge 1 commit into
Project-MONAI:devfrom
rtmalikian:fix/issue-8923-perceptual-loss-typo

Conversation

@rtmalikian

@rtmalikian rtmalikian commented Jun 18, 2026

Copy link
Copy Markdown

Fixes #8923

Problem

In monai/losses/perceptual.py line 115, the warning message for MedicalNet channel_wise has a typo:

"MedicalNet networks supp, ort channel-wise loss. Consider setting channel_wise=True."

The word "support" is broken by a stray comma and space: supp, ortsupport.

Solution

Correct the typo to: "MedicalNet networks support channel-wise loss. Consider setting channel_wise=True."

Verification

$ python3 -c "import ast; ast.parse(open('monai/losses/perceptual.py').read()); print('Syntax OK')"
Syntax OK

The fix changes only the warning message string — no logic or behavior is affected.


About the Author: Raphael Malikian — Clinical AI Solutions Architect. I specialise in building and fixing AI/ML systems for healthcare, including vector databases, RAG pipelines, and clinical NLP. If you need help with your project or think I can add value to your organisation, feel free to reach out — I'd love to connect.

📧 rtmalikian@gmail.com
🔗 GitHub: https://github.com/rtmalikian
🔗 LinkedIn: http://www.linkedin.com/in/raphael-t-malikian-mbbs-bsc-hons-71075436a


Disclosure: This code was developed with assistance from mimo-2.5-pro (Xiaomi) via Hermes Agent (Nous Research). All changes were reviewed, tested against the actual codebase, and verified for correctness.

Changelog

Date Change Author
2026-06-18 Initial fix: correct typo in PerceptualLoss MedicalNet warning rtmalikian
2026-06-18 Added DCO sign-off to commit rtmalikian
2026-06-18 Updated PR documentation with changelog rtmalikian

Files Changed

  • monai/losses/perceptual.py — Fixed typo "supp, ort" → "support" in MedicalNet channel_wise warning message

Verification

  • ✅ Warning message now reads correctly: "MedicalNet networks support channel-wise loss."
  • ✅ DCO sign-off present on all commits

@rtmalikian rtmalikian requested a review from virginiafdez as a code owner June 18, 2026 23:49
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

One-character typo fix in a warning string inside monai/losses/perceptual.py. The corrected message is emitted when validating MedicalNet configuration related to channel-wise loss support. No logic, control flow, or public API changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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
Title check ✅ Passed Title clearly and specifically describes the main change: correcting a typo in the PerceptualLoss MedicalNet warning message.
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.
Description check ✅ Passed The pull request description comprehensively covers all required sections: problem statement, solution, verification, and includes changelog. However, the template's 'Types of changes' checklist is not completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

The warning message for MedicalNet channel_wise had 'supp, ort' instead
of 'support', making the message confusing for users.

Fixes Project-MONAI#8923

Signed-off-by: Raphael Malikian <rtmalikian@gmail.com>
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.

fix: typo in PerceptualLoss MedicalNet warning message

1 participant