Commit 0b0a840
fix(losses): add missing docstring entries for default parameters (#8755)
## Description
Fixes missing and incomplete docstring parameter documentation in two
loss files, consistent with the pattern established in #8701.
### Changes
**`monai/losses/hausdorff_loss.py`**
- `HausdorffDTLoss.__init__`: Added missing `alpha` parameter (default
`2.0`) to the `Args` section. The parameter was present in the function
signature but completely absent from the docstring.
**`monai/losses/cldice.py`**
- `SoftclDiceLoss.__init__`: Added `Defaults to X.` to `iter_` and
`smooth` parameter descriptions.
- `SoftDiceclDiceLoss.__init__`: Added `Defaults to X.` to `iter_`,
`smooth`, and `alpha` parameter descriptions.
### Motivation
These are pure docstring fixes — no code logic was changed. The missing
`alpha` documentation in `HausdorffDTLoss` is the primary fix, and the
`cldice.py` changes follow the same "document defaults" pattern from
#8701.
## Checklist
- [x] Docstring-only change (no logic modified)
- [x] No new tests required
- [x] DCO sign-off included
---------
Signed-off-by: Shiran Yu <shiran.yu@bristol.ac.uk>
Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>1 parent b2db04d commit 0b0a840
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments