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
{{ message }}
Repository navigation
fix: add missing stacklevel=2 to warnings.warn() calls in losses/ #8929
28 calls to warnings.warn() in monai/losses/ are missing the stacklevel parameter. Without stacklevel=2, warnings point to the MONAI internal code instead of the user's calling code, making it difficult for users to identify which part of their script triggered the warning.
Proposed Fix
Add stacklevel=2 to all 28 warnings.warn() calls in:
Activity
fix: add missing stacklevel=2 to warnings.warn() in losses/ (Fixes #8929