Skip to content

Commit 718e4be

Browse files
authored
auto updates (#7439)
Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
1 parent 33afaef commit 718e4be

File tree

734 files changed

+1046
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

734 files changed

+1046
-4
lines changed

monai/apps/datasets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ def get_dataset(self, folds: Sequence[int] | int, **dataset_params: Any) -> obje
737737
dataset_params_.update(dataset_params)
738738

739739
class _NsplitsDataset(self.dataset_cls): # type: ignore
740+
740741
def _split_datalist(self, datalist: list[dict]) -> list[dict]:
741742
data = partition_dataset(data=datalist, num_partitions=nfolds, shuffle=True, seed=seed)
742743
return select_cross_validation_folds(partitions=data, folds=folds)

monai/apps/deepedit/transforms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535

3636
class DiscardAddGuidanced(MapTransform):
37+
3738
def __init__(
3839
self,
3940
keys: KeysCollection,
@@ -84,6 +85,7 @@ def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashable, np.nda
8485

8586

8687
class NormalizeLabelsInDatasetd(MapTransform):
88+
8789
def __init__(
8890
self, keys: KeysCollection, label_names: dict[str, int] | None = None, allow_missing_keys: bool = False
8991
):
@@ -121,6 +123,7 @@ def __call__(self, data: Mapping[Hashable, np.ndarray]) -> dict[Hashable, np.nda
121123

122124

123125
class SingleLabelSelectiond(MapTransform):
126+
124127
def __init__(
125128
self, keys: KeysCollection, label_names: Sequence[str] | None = None, allow_missing_keys: bool = False
126129
):

monai/apps/detection/metrics/coco.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373

7474
class COCOMetric:
75+
7576
def __init__(
7677
self,
7778
classes: Sequence[str],

monai/apps/detection/utils/ATSS_matcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def compute_matches(
164164

165165

166166
class ATSSMatcher(Matcher):
167+
167168
def __init__(
168169
self,
169170
num_candidates: int = 4,

monai/apps/pathology/transforms/post/array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def __call__(self, prob_map: NdarrayOrTensor) -> NdarrayOrTensor:
162162
pred = label(pred)[0]
163163
if self.remove_small_objects is not None:
164164
pred = self.remove_small_objects(pred)
165-
pred[pred > 0] = 1 # type: ignore
165+
pred[pred > 0] = 1
166166

167167
return convert_to_dst_type(pred, prob_map, dtype=self.dtype)[0]
168168

@@ -338,7 +338,7 @@ def __call__(self, mask: NdarrayOrTensor, instance_border: NdarrayOrTensor) -> N
338338
instance_border = instance_border >= self.threshold # uncertain area
339339

340340
marker = mask - convert_to_dst_type(instance_border, mask)[0] # certain foreground
341-
marker[marker < 0] = 0 # type: ignore
341+
marker[marker < 0] = 0
342342
marker = self.postprocess_fn(marker)
343343
marker = convert_to_numpy(marker)
344344

@@ -634,7 +634,7 @@ def __call__( # type: ignore
634634

635635
seg_map_crop = convert_to_dst_type(seg_map_crop == instance_id, type_map_crop, dtype=bool)[0]
636636

637-
inst_type = type_map_crop[seg_map_crop] # type: ignore
637+
inst_type = type_map_crop[seg_map_crop]
638638
type_list, type_pixels = unique(inst_type, return_counts=True)
639639
type_list = list(zip(type_list, type_pixels))
640640
type_list = sorted(type_list, key=lambda x: x[1], reverse=True)

monai/data/dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,7 @@ def __len__(self) -> int:
12751275
return min(len(dataset) for dataset in self.data)
12761276

12771277
def _transform(self, index: int):
1278+
12781279
def to_list(x):
12791280
return list(x) if isinstance(x, (tuple, list)) else [x]
12801281

monai/fl/client/client_algo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def abort(self, extra: dict | None = None) -> None:
5757

5858

5959
class ClientAlgoStats(BaseClient):
60+
6061
def get_data_stats(self, extra: dict | None = None) -> ExchangeObject:
6162
"""
6263
Get summary statistics about the local data.

monai/handlers/ignite_metric.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def attach(self, engine: Engine, name: str) -> None: # type: ignore[override]
157157

158158
@deprecated(since="1.2", removed="1.4", msg_suffix="Use IgniteMetricHandler instead of IgniteMetric.")
159159
class IgniteMetric(IgniteMetricHandler):
160+
160161
def __init__(
161162
self,
162163
metric_fn: CumulativeIterationMetric | None = None,

monai/metrics/f_beta_score.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323

2424
class FBetaScore(CumulativeIterationMetric):
25+
2526
def __init__(
2627
self,
2728
beta: float = 1.0,

monai/networks/blocks/dynunet_block.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def forward(self, inp, skip):
245245

246246

247247
class UnetOutBlock(nn.Module):
248+
248249
def __init__(
249250
self, spatial_dims: int, in_channels: int, out_channels: int, dropout: tuple | str | float | None = None
250251
):

0 commit comments

Comments
 (0)