monai-weekly 1.4.dev2438__py3-none-any.whl → 1.4.dev2440__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- monai/__init__.py +2 -1
- monai/_version.py +3 -3
- monai/bundle/scripts.py +2 -1
- monai/config/deviceconfig.py +5 -5
- monai/engines/evaluator.py +2 -2
- monai/engines/trainer.py +1 -2
- monai/engines/utils.py +1 -2
- monai/engines/workflow.py +1 -2
- monai/handlers/checkpoint_loader.py +1 -2
- monai/handlers/checkpoint_saver.py +1 -2
- monai/handlers/classification_saver.py +1 -1
- monai/handlers/decollate_batch.py +2 -2
- monai/handlers/earlystop_handler.py +1 -2
- monai/handlers/garbage_collector.py +1 -2
- monai/handlers/ignite_metric.py +1 -2
- monai/handlers/logfile_handler.py +1 -2
- monai/handlers/lr_schedule_handler.py +1 -2
- monai/handlers/metric_logger.py +1 -2
- monai/handlers/metrics_saver.py +1 -1
- monai/handlers/mlflow_handler.py +1 -2
- monai/handlers/nvtx_handlers.py +1 -2
- monai/handlers/parameter_scheduler.py +1 -2
- monai/handlers/postprocessing.py +1 -2
- monai/handlers/probability_maps.py +2 -2
- monai/handlers/smartcache_handler.py +1 -2
- monai/handlers/stats_handler.py +1 -2
- monai/handlers/tensorboard_handlers.py +1 -2
- monai/handlers/trt_handler.py +1 -2
- monai/handlers/utils.py +2 -2
- monai/handlers/validation_handler.py +1 -2
- monai/networks/nets/hovernet.py +1 -2
- monai/networks/nets/unet.py +0 -3
- monai/networks/nets/voxelmorph.py +0 -5
- monai/transforms/adaptors.py +0 -5
- monai/transforms/intensity/array.py +1 -1
- monai/utils/__init__.py +3 -3
- monai/utils/dist.py +1 -1
- monai/utils/enums.py +30 -21
- monai/utils/jupyter_utils.py +1 -1
- monai/utils/module.py +0 -24
- {monai_weekly-1.4.dev2438.dist-info → monai_weekly-1.4.dev2440.dist-info}/METADATA +1 -1
- {monai_weekly-1.4.dev2438.dist-info → monai_weekly-1.4.dev2440.dist-info}/RECORD +45 -46
- monai/utils/aliases.py +0 -103
- {monai_weekly-1.4.dev2438.dist-info → monai_weekly-1.4.dev2440.dist-info}/LICENSE +0 -0
- {monai_weekly-1.4.dev2438.dist-info → monai_weekly-1.4.dev2440.dist-info}/WHEEL +0 -0
- {monai_weekly-1.4.dev2438.dist-info → monai_weekly-1.4.dev2440.dist-info}/top_level.txt +0 -0
monai/__init__.py
CHANGED
@@ -79,6 +79,7 @@ if sys.version_info.major != PY_REQUIRED_MAJOR or sys.version_info.minor < PY_RE
|
|
79
79
|
category=RuntimeWarning,
|
80
80
|
)
|
81
81
|
|
82
|
+
|
82
83
|
from .utils.module import load_submodules # noqa: E402
|
83
84
|
|
84
85
|
# handlers_* have some external decorators the users may not have installed
|
@@ -135,4 +136,4 @@ except BaseException:
|
|
135
136
|
|
136
137
|
if MONAIEnvVars.debug():
|
137
138
|
raise
|
138
|
-
__commit_id__ = "
|
139
|
+
__commit_id__ = "76ef9f40c8da626928238c91eacddc789b0b4530"
|
monai/_version.py
CHANGED
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-
|
11
|
+
"date": "2024-10-06T02:29:02+0000",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "1.4.
|
14
|
+
"full-revisionid": "c2bfe29203f3a82b689d3f1d5334e484f6fbb1a6",
|
15
|
+
"version": "1.4.dev2440"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
monai/bundle/scripts.py
CHANGED
@@ -34,7 +34,7 @@ from monai.bundle.config_item import ConfigComponent
|
|
34
34
|
from monai.bundle.config_parser import ConfigParser
|
35
35
|
from monai.bundle.utils import DEFAULT_INFERENCE, DEFAULT_METADATA, merge_kv
|
36
36
|
from monai.bundle.workflows import BundleWorkflow, ConfigWorkflow
|
37
|
-
from monai.config import
|
37
|
+
from monai.config import PathLike
|
38
38
|
from monai.data import load_net_with_metadata, save_net_with_metadata
|
39
39
|
from monai.networks import (
|
40
40
|
convert_to_onnx,
|
@@ -45,6 +45,7 @@ from monai.networks import (
|
|
45
45
|
save_state,
|
46
46
|
)
|
47
47
|
from monai.utils import (
|
48
|
+
IgniteInfo,
|
48
49
|
check_parent_dir,
|
49
50
|
deprecated_arg,
|
50
51
|
ensure_tuple,
|
monai/config/deviceconfig.py
CHANGED
@@ -23,6 +23,8 @@ import numpy as np
|
|
23
23
|
import torch
|
24
24
|
|
25
25
|
import monai
|
26
|
+
from monai.utils.deprecate_utils import deprecated
|
27
|
+
from monai.utils.enums import IgniteInfo as _IgniteInfo
|
26
28
|
from monai.utils.module import OptionalImportError, get_package_version, optional_import
|
27
29
|
|
28
30
|
try:
|
@@ -261,13 +263,11 @@ def print_debug_info(file: TextIO = sys.stdout) -> None:
|
|
261
263
|
print_gpu_info(file)
|
262
264
|
|
263
265
|
|
266
|
+
@deprecated(since="1.4.0", removed="1.6.0", msg_suffix="Please use `monai.utils.enums.IgniteInfo` instead.")
|
264
267
|
class IgniteInfo:
|
265
|
-
"""
|
266
|
-
Config information of the PyTorch ignite package.
|
267
|
-
|
268
|
-
"""
|
268
|
+
"""Deprecated Import of IgniteInfo enum, which was moved to `monai.utils.enums.IgniteInfo`."""
|
269
269
|
|
270
|
-
OPT_IMPORT_VERSION =
|
270
|
+
OPT_IMPORT_VERSION = _IgniteInfo.OPT_IMPORT_VERSION
|
271
271
|
|
272
272
|
|
273
273
|
if __name__ == "__main__":
|
monai/engines/evaluator.py
CHANGED
@@ -17,14 +17,14 @@ from typing import TYPE_CHECKING, Any, Callable, Iterable, Sequence
|
|
17
17
|
import torch
|
18
18
|
from torch.utils.data import DataLoader
|
19
19
|
|
20
|
-
from monai.config import
|
20
|
+
from monai.config import KeysCollection
|
21
21
|
from monai.data import MetaTensor
|
22
22
|
from monai.engines.utils import IterationEvents, default_metric_cmp_fn, default_prepare_batch
|
23
23
|
from monai.engines.workflow import Workflow
|
24
24
|
from monai.inferers import Inferer, SimpleInferer
|
25
25
|
from monai.networks.utils import eval_mode, train_mode
|
26
26
|
from monai.transforms import Transform
|
27
|
-
from monai.utils import ForwardMode, ensure_tuple, min_version, optional_import
|
27
|
+
from monai.utils import ForwardMode, IgniteInfo, ensure_tuple, min_version, optional_import
|
28
28
|
from monai.utils.enums import CommonKeys as Keys
|
29
29
|
from monai.utils.enums import EngineStatsKeys as ESKeys
|
30
30
|
from monai.utils.module import look_up_option, pytorch_after
|
monai/engines/trainer.py
CHANGED
@@ -18,13 +18,12 @@ import torch
|
|
18
18
|
from torch.optim.optimizer import Optimizer
|
19
19
|
from torch.utils.data import DataLoader
|
20
20
|
|
21
|
-
from monai.config import IgniteInfo
|
22
21
|
from monai.data import MetaTensor
|
23
22
|
from monai.engines.utils import IterationEvents, default_make_latent, default_metric_cmp_fn, default_prepare_batch
|
24
23
|
from monai.engines.workflow import Workflow
|
25
24
|
from monai.inferers import Inferer, SimpleInferer
|
26
25
|
from monai.transforms import Transform
|
27
|
-
from monai.utils import AdversarialIterationEvents, AdversarialKeys, GanKeys, min_version, optional_import
|
26
|
+
from monai.utils import AdversarialIterationEvents, AdversarialKeys, GanKeys, IgniteInfo, min_version, optional_import
|
28
27
|
from monai.utils.enums import CommonKeys as Keys
|
29
28
|
from monai.utils.enums import EngineStatsKeys as ESKeys
|
30
29
|
from monai.utils.module import pytorch_after
|
monai/engines/utils.py
CHANGED
@@ -18,9 +18,8 @@ from typing import TYPE_CHECKING, Any, Mapping, cast
|
|
18
18
|
import torch
|
19
19
|
import torch.nn as nn
|
20
20
|
|
21
|
-
from monai.config import IgniteInfo
|
22
21
|
from monai.transforms import apply_transform
|
23
|
-
from monai.utils import ensure_tuple, min_version, optional_import
|
22
|
+
from monai.utils import IgniteInfo, ensure_tuple, min_version, optional_import
|
24
23
|
from monai.utils.enums import CommonKeys, GanKeys
|
25
24
|
|
26
25
|
if TYPE_CHECKING:
|
monai/engines/workflow.py
CHANGED
@@ -20,10 +20,9 @@ import torch.distributed as dist
|
|
20
20
|
from torch.utils.data import DataLoader
|
21
21
|
from torch.utils.data.distributed import DistributedSampler
|
22
22
|
|
23
|
-
from monai.config import IgniteInfo
|
24
23
|
from monai.engines.utils import IterationEvents, default_metric_cmp_fn, default_prepare_batch
|
25
24
|
from monai.transforms import Decollated
|
26
|
-
from monai.utils import ensure_tuple, is_scalar, min_version, optional_import
|
25
|
+
from monai.utils import IgniteInfo, ensure_tuple, is_scalar, min_version, optional_import
|
27
26
|
|
28
27
|
from .utils import engine_apply_transform
|
29
28
|
|
@@ -17,9 +17,8 @@ from typing import TYPE_CHECKING
|
|
17
17
|
|
18
18
|
import torch
|
19
19
|
|
20
|
-
from monai.config import IgniteInfo
|
21
20
|
from monai.networks.utils import copy_model_state
|
22
|
-
from monai.utils import min_version, optional_import
|
21
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
23
22
|
|
24
23
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
25
24
|
Checkpoint, _ = optional_import("ignite.handlers", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Checkpoint")
|
@@ -17,8 +17,7 @@ import warnings
|
|
17
17
|
from collections.abc import Mapping
|
18
18
|
from typing import TYPE_CHECKING, Any
|
19
19
|
|
20
|
-
from monai.
|
21
|
-
from monai.utils import is_scalar, min_version, optional_import
|
20
|
+
from monai.utils import IgniteInfo, is_scalar, min_version, optional_import
|
22
21
|
|
23
22
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
24
23
|
|
@@ -18,8 +18,8 @@ from typing import TYPE_CHECKING
|
|
18
18
|
|
19
19
|
import torch
|
20
20
|
|
21
|
-
from monai.config import IgniteInfo
|
22
21
|
from monai.data import CSVSaver, decollate_batch
|
22
|
+
from monai.utils import IgniteInfo
|
23
23
|
from monai.utils import ImageMetaKey as Key
|
24
24
|
from monai.utils import evenly_divisible_all_gather, min_version, optional_import, string_list_all_gather
|
25
25
|
|
@@ -13,10 +13,10 @@ from __future__ import annotations
|
|
13
13
|
|
14
14
|
from typing import TYPE_CHECKING
|
15
15
|
|
16
|
-
from monai.config import
|
16
|
+
from monai.config import KeysCollection
|
17
17
|
from monai.engines.utils import IterationEvents
|
18
18
|
from monai.transforms import Decollated
|
19
|
-
from monai.utils import min_version, optional_import
|
19
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
20
20
|
|
21
21
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
22
22
|
if TYPE_CHECKING:
|
@@ -14,8 +14,7 @@ from __future__ import annotations
|
|
14
14
|
from collections.abc import Callable
|
15
15
|
from typing import TYPE_CHECKING
|
16
16
|
|
17
|
-
from monai.
|
18
|
-
from monai.utils import min_version, optional_import
|
17
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
19
18
|
|
20
19
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
21
20
|
EarlyStopping, _ = optional_import("ignite.handlers", IgniteInfo.OPT_IMPORT_VERSION, min_version, "EarlyStopping")
|
@@ -14,8 +14,7 @@ from __future__ import annotations
|
|
14
14
|
import gc
|
15
15
|
from typing import TYPE_CHECKING
|
16
16
|
|
17
|
-
from monai.
|
18
|
-
from monai.utils import min_version, optional_import
|
17
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
19
18
|
|
20
19
|
if TYPE_CHECKING:
|
21
20
|
from ignite.engine import Engine, Events
|
monai/handlers/ignite_metric.py
CHANGED
@@ -18,9 +18,8 @@ from typing import TYPE_CHECKING, Any, cast
|
|
18
18
|
import torch
|
19
19
|
from torch.nn.modules.loss import _Loss
|
20
20
|
|
21
|
-
from monai.config import IgniteInfo
|
22
21
|
from monai.metrics import CumulativeIterationMetric, LossMetric
|
23
|
-
from monai.utils import MetricReduction, min_version, optional_import
|
22
|
+
from monai.utils import IgniteInfo, MetricReduction, min_version, optional_import
|
24
23
|
|
25
24
|
idist, _ = optional_import("ignite", IgniteInfo.OPT_IMPORT_VERSION, min_version, "distributed")
|
26
25
|
|
@@ -15,8 +15,7 @@ import logging
|
|
15
15
|
import os
|
16
16
|
from typing import TYPE_CHECKING
|
17
17
|
|
18
|
-
from monai.
|
19
|
-
from monai.utils import min_version, optional_import
|
18
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
20
19
|
|
21
20
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
22
21
|
if TYPE_CHECKING:
|
@@ -17,8 +17,7 @@ from typing import TYPE_CHECKING, Any
|
|
17
17
|
|
18
18
|
from torch.optim.lr_scheduler import ReduceLROnPlateau, _LRScheduler
|
19
19
|
|
20
|
-
from monai.
|
21
|
-
from monai.utils import ensure_tuple, min_version, optional_import
|
20
|
+
from monai.utils import IgniteInfo, ensure_tuple, min_version, optional_import
|
22
21
|
|
23
22
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
24
23
|
if TYPE_CHECKING:
|
monai/handlers/metric_logger.py
CHANGED
@@ -17,8 +17,7 @@ from enum import Enum
|
|
17
17
|
from threading import RLock
|
18
18
|
from typing import TYPE_CHECKING, Any
|
19
19
|
|
20
|
-
from monai.
|
21
|
-
from monai.utils import min_version, optional_import
|
20
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
22
21
|
from monai.utils.enums import CommonKeys
|
23
22
|
|
24
23
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
monai/handlers/metrics_saver.py
CHANGED
@@ -14,9 +14,9 @@ from __future__ import annotations
|
|
14
14
|
from collections.abc import Callable, Sequence
|
15
15
|
from typing import TYPE_CHECKING
|
16
16
|
|
17
|
-
from monai.config import IgniteInfo
|
18
17
|
from monai.data import decollate_batch
|
19
18
|
from monai.handlers.utils import write_metrics_reports
|
19
|
+
from monai.utils import IgniteInfo
|
20
20
|
from monai.utils import ImageMetaKey as Key
|
21
21
|
from monai.utils import ensure_tuple, min_version, optional_import, string_list_all_gather
|
22
22
|
|
monai/handlers/mlflow_handler.py
CHANGED
@@ -22,8 +22,7 @@ import torch
|
|
22
22
|
from torch.utils.data import Dataset
|
23
23
|
|
24
24
|
from monai.apps.utils import get_logger
|
25
|
-
from monai.
|
26
|
-
from monai.utils import CommonKeys, ensure_tuple, min_version, optional_import
|
25
|
+
from monai.utils import CommonKeys, IgniteInfo, ensure_tuple, min_version, optional_import
|
27
26
|
|
28
27
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
29
28
|
mlflow, _ = optional_import("mlflow", descriptor="Please install mlflow before using MLFlowHandler.")
|
monai/handlers/nvtx_handlers.py
CHANGED
@@ -16,8 +16,7 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
from typing import TYPE_CHECKING
|
18
18
|
|
19
|
-
from monai.
|
20
|
-
from monai.utils import ensure_tuple, min_version, optional_import
|
19
|
+
from monai.utils import IgniteInfo, ensure_tuple, min_version, optional_import
|
21
20
|
|
22
21
|
_nvtx, _ = optional_import("torch._C._nvtx", descriptor="NVTX is not installed. Are you sure you have a CUDA build?")
|
23
22
|
if TYPE_CHECKING:
|
@@ -16,8 +16,7 @@ from bisect import bisect_right
|
|
16
16
|
from collections.abc import Callable
|
17
17
|
from typing import TYPE_CHECKING
|
18
18
|
|
19
|
-
from monai.
|
20
|
-
from monai.utils import min_version, optional_import
|
19
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
21
20
|
|
22
21
|
if TYPE_CHECKING:
|
23
22
|
from ignite.engine import Engine, Events
|
monai/handlers/postprocessing.py
CHANGED
@@ -14,9 +14,8 @@ from __future__ import annotations
|
|
14
14
|
from collections.abc import Callable
|
15
15
|
from typing import TYPE_CHECKING
|
16
16
|
|
17
|
-
from monai.config import IgniteInfo
|
18
17
|
from monai.engines.utils import IterationEvents, engine_apply_transform
|
19
|
-
from monai.utils import min_version, optional_import
|
18
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
20
19
|
|
21
20
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
22
21
|
if TYPE_CHECKING:
|
@@ -17,10 +17,10 @@ from typing import TYPE_CHECKING
|
|
17
17
|
|
18
18
|
import numpy as np
|
19
19
|
|
20
|
-
from monai.config import DtypeLike
|
20
|
+
from monai.config import DtypeLike
|
21
21
|
from monai.data.folder_layout import FolderLayout
|
22
22
|
from monai.utils import ProbMapKeys, min_version, optional_import
|
23
|
-
from monai.utils.enums import CommonKeys
|
23
|
+
from monai.utils.enums import CommonKeys, IgniteInfo
|
24
24
|
|
25
25
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
26
26
|
if TYPE_CHECKING:
|
@@ -13,9 +13,8 @@ from __future__ import annotations
|
|
13
13
|
|
14
14
|
from typing import TYPE_CHECKING
|
15
15
|
|
16
|
-
from monai.config import IgniteInfo
|
17
16
|
from monai.data import SmartCacheDataset
|
18
|
-
from monai.utils import min_version, optional_import
|
17
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
19
18
|
|
20
19
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
21
20
|
if TYPE_CHECKING:
|
monai/handlers/stats_handler.py
CHANGED
@@ -19,8 +19,7 @@ from typing import TYPE_CHECKING, Any
|
|
19
19
|
import torch
|
20
20
|
|
21
21
|
from monai.apps import get_logger
|
22
|
-
from monai.
|
23
|
-
from monai.utils import is_scalar, min_version, optional_import
|
22
|
+
from monai.utils import IgniteInfo, is_scalar, min_version, optional_import
|
24
23
|
|
25
24
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
26
25
|
if TYPE_CHECKING:
|
@@ -18,8 +18,7 @@ from typing import TYPE_CHECKING, Any
|
|
18
18
|
import numpy as np
|
19
19
|
import torch
|
20
20
|
|
21
|
-
from monai.
|
22
|
-
from monai.utils import is_scalar, min_version, optional_import
|
21
|
+
from monai.utils import IgniteInfo, is_scalar, min_version, optional_import
|
23
22
|
from monai.visualize import plot_2d_or_3d_image
|
24
23
|
|
25
24
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
monai/handlers/trt_handler.py
CHANGED
@@ -13,9 +13,8 @@ from __future__ import annotations
|
|
13
13
|
|
14
14
|
from typing import TYPE_CHECKING
|
15
15
|
|
16
|
-
from monai.config import IgniteInfo
|
17
16
|
from monai.networks import trt_compile
|
18
|
-
from monai.utils import min_version, optional_import
|
17
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
19
18
|
|
20
19
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
21
20
|
if TYPE_CHECKING:
|
monai/handlers/utils.py
CHANGED
@@ -19,8 +19,8 @@ from typing import TYPE_CHECKING, Any
|
|
19
19
|
import numpy as np
|
20
20
|
import torch
|
21
21
|
|
22
|
-
from monai.config import
|
23
|
-
from monai.utils import ensure_tuple, look_up_option, min_version, optional_import
|
22
|
+
from monai.config import KeysCollection, PathLike
|
23
|
+
from monai.utils import IgniteInfo, ensure_tuple, look_up_option, min_version, optional_import
|
24
24
|
|
25
25
|
idist, _ = optional_import("ignite", IgniteInfo.OPT_IMPORT_VERSION, min_version, "distributed")
|
26
26
|
if TYPE_CHECKING:
|
@@ -13,9 +13,8 @@ from __future__ import annotations
|
|
13
13
|
|
14
14
|
from typing import TYPE_CHECKING
|
15
15
|
|
16
|
-
from monai.config import IgniteInfo
|
17
16
|
from monai.engines.evaluator import Evaluator
|
18
|
-
from monai.utils import min_version, optional_import
|
17
|
+
from monai.utils import IgniteInfo, min_version, optional_import
|
19
18
|
|
20
19
|
Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events")
|
21
20
|
if TYPE_CHECKING:
|
monai/networks/nets/hovernet.py
CHANGED
@@ -43,7 +43,7 @@ from monai.networks.blocks import UpSample
|
|
43
43
|
from monai.networks.layers.factories import Conv, Dropout
|
44
44
|
from monai.networks.layers.utils import get_act_layer, get_norm_layer
|
45
45
|
from monai.utils.enums import HoVerNetBranch, HoVerNetMode, InterpolateMode, UpsampleMode
|
46
|
-
from monai.utils.module import
|
46
|
+
from monai.utils.module import look_up_option
|
47
47
|
|
48
48
|
__all__ = ["HoVerNet", "Hovernet", "HoVernet", "HoVerNet"]
|
49
49
|
|
@@ -409,7 +409,6 @@ class _DecoderBranch(nn.ModuleList):
|
|
409
409
|
return x
|
410
410
|
|
411
411
|
|
412
|
-
@export("monai.networks.nets")
|
413
412
|
class HoVerNet(nn.Module):
|
414
413
|
"""HoVerNet model
|
415
414
|
|
monai/networks/nets/unet.py
CHANGED
@@ -20,13 +20,10 @@ import torch.nn as nn
|
|
20
20
|
from monai.networks.blocks.convolutions import Convolution, ResidualUnit
|
21
21
|
from monai.networks.layers.factories import Act, Norm
|
22
22
|
from monai.networks.layers.simplelayers import SkipConnection
|
23
|
-
from monai.utils import alias, export
|
24
23
|
|
25
24
|
__all__ = ["UNet", "Unet"]
|
26
25
|
|
27
26
|
|
28
|
-
@export("monai.networks.nets")
|
29
|
-
@alias("Unet")
|
30
27
|
class UNet(nn.Module):
|
31
28
|
"""
|
32
29
|
Enhanced version of UNet which has residual units implemented with the ResidualUnit class.
|
@@ -21,13 +21,10 @@ from monai.networks.blocks.convolutions import Convolution
|
|
21
21
|
from monai.networks.blocks.upsample import UpSample
|
22
22
|
from monai.networks.blocks.warp import DVF2DDF, Warp
|
23
23
|
from monai.networks.layers.simplelayers import SkipConnection
|
24
|
-
from monai.utils import alias, export
|
25
24
|
|
26
25
|
__all__ = ["VoxelMorphUNet", "voxelmorphunet", "VoxelMorph", "voxelmorph"]
|
27
26
|
|
28
27
|
|
29
|
-
@export("monai.networks.nets")
|
30
|
-
@alias("voxelmorphunet")
|
31
28
|
class VoxelMorphUNet(nn.Module):
|
32
29
|
"""
|
33
30
|
The backbone network used in VoxelMorph. See :py:class:`monai.networks.nets.VoxelMorph` for more details.
|
@@ -340,8 +337,6 @@ class VoxelMorphUNet(nn.Module):
|
|
340
337
|
voxelmorphunet = VoxelMorphUNet
|
341
338
|
|
342
339
|
|
343
|
-
@export("monai.networks.nets")
|
344
|
-
@alias("voxelmorph")
|
345
340
|
class VoxelMorph(nn.Module):
|
346
341
|
"""
|
347
342
|
A re-implementation of VoxelMorph framework for medical image registration as described in
|
monai/transforms/adaptors.py
CHANGED
@@ -125,12 +125,9 @@ from __future__ import annotations
|
|
125
125
|
|
126
126
|
from typing import Callable
|
127
127
|
|
128
|
-
from monai.utils import export as _monai_export
|
129
|
-
|
130
128
|
__all__ = ["adaptor", "apply_alias", "to_kwargs", "FunctionSignature"]
|
131
129
|
|
132
130
|
|
133
|
-
@_monai_export("monai.transforms")
|
134
131
|
def adaptor(function, outputs, inputs=None):
|
135
132
|
|
136
133
|
def must_be_types_or_none(variable_name, variable, types):
|
@@ -215,7 +212,6 @@ def adaptor(function, outputs, inputs=None):
|
|
215
212
|
return _inner
|
216
213
|
|
217
214
|
|
218
|
-
@_monai_export("monai.transforms")
|
219
215
|
def apply_alias(fn, name_map):
|
220
216
|
|
221
217
|
def _inner(data):
|
@@ -236,7 +232,6 @@ def apply_alias(fn, name_map):
|
|
236
232
|
return _inner
|
237
233
|
|
238
234
|
|
239
|
-
@_monai_export("monai.transforms")
|
240
235
|
def to_kwargs(fn):
|
241
236
|
|
242
237
|
def _inner(data):
|
@@ -1411,7 +1411,7 @@ class ScaleIntensityRangePercentiles(Transform):
|
|
1411
1411
|
else:
|
1412
1412
|
img_t = self._normalize(img=img_t)
|
1413
1413
|
|
1414
|
-
return convert_to_dst_type(img_t, dst=img)[0]
|
1414
|
+
return convert_to_dst_type(img_t, dst=img, dtype=self.dtype)[0]
|
1415
1415
|
|
1416
1416
|
|
1417
1417
|
class MaskIntensity(Transform):
|
monai/utils/__init__.py
CHANGED
@@ -11,8 +11,6 @@
|
|
11
11
|
|
12
12
|
from __future__ import annotations
|
13
13
|
|
14
|
-
# have to explicitly bring these in here to resolve circular import issues
|
15
|
-
from .aliases import alias, resolve_name
|
16
14
|
from .component_store import ComponentStore
|
17
15
|
from .decorators import MethodReplacer, RestartGenerator
|
18
16
|
from .deprecate_utils import DeprecatedError, deprecated, deprecated_arg, deprecated_arg_default
|
@@ -40,6 +38,7 @@ from .enums import (
|
|
40
38
|
GridSamplePadMode,
|
41
39
|
HoVerNetBranch,
|
42
40
|
HoVerNetMode,
|
41
|
+
IgniteInfo,
|
43
42
|
InterpolateMode,
|
44
43
|
JITMetadataKeys,
|
45
44
|
LazyAttr,
|
@@ -109,7 +108,6 @@ from .module import (
|
|
109
108
|
allow_missing_reference,
|
110
109
|
damerau_levenshtein_distance,
|
111
110
|
exact_version,
|
112
|
-
export,
|
113
111
|
get_full_type_name,
|
114
112
|
get_package_version,
|
115
113
|
get_torch_version_tuple,
|
@@ -153,3 +151,5 @@ from .type_conversion import (
|
|
153
151
|
get_numpy_dtype_from_string,
|
154
152
|
get_torch_dtype_from_string,
|
155
153
|
)
|
154
|
+
|
155
|
+
# have to explicitly bring these in here to resolve circular import issues
|
monai/utils/dist.py
CHANGED
@@ -24,7 +24,7 @@ from typing import overload
|
|
24
24
|
import torch
|
25
25
|
import torch.distributed as dist
|
26
26
|
|
27
|
-
from monai.
|
27
|
+
from monai.utils.enums import IgniteInfo
|
28
28
|
from monai.utils.module import min_version, optional_import
|
29
29
|
|
30
30
|
idist, has_ignite = optional_import("ignite", IgniteInfo.OPT_IMPORT_VERSION, min_version, "distributed")
|
monai/utils/enums.py
CHANGED
@@ -15,7 +15,6 @@ import random
|
|
15
15
|
from enum import Enum
|
16
16
|
from typing import TYPE_CHECKING
|
17
17
|
|
18
|
-
from monai.config import IgniteInfo
|
19
18
|
from monai.utils.module import min_version, optional_import
|
20
19
|
|
21
20
|
__all__ = [
|
@@ -61,6 +60,7 @@ __all__ = [
|
|
61
60
|
"BundleProperty",
|
62
61
|
"BundlePropertyConfig",
|
63
62
|
"AlgoKeys",
|
63
|
+
"IgniteInfo",
|
64
64
|
]
|
65
65
|
|
66
66
|
|
@@ -89,14 +89,6 @@ class StrEnum(str, Enum):
|
|
89
89
|
return self.value
|
90
90
|
|
91
91
|
|
92
|
-
if TYPE_CHECKING:
|
93
|
-
from ignite.engine import EventEnum
|
94
|
-
else:
|
95
|
-
EventEnum, _ = optional_import(
|
96
|
-
"ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "EventEnum", as_type="base"
|
97
|
-
)
|
98
|
-
|
99
|
-
|
100
92
|
class NumpyPadMode(StrEnum):
|
101
93
|
"""
|
102
94
|
See also: https://numpy.org/doc/1.18/reference/generated/numpy.pad.html
|
@@ -717,6 +709,35 @@ class AdversarialKeys(StrEnum):
|
|
717
709
|
DISCRIMINATOR_LOSS = "discriminator_loss"
|
718
710
|
|
719
711
|
|
712
|
+
class OrderingType(StrEnum):
|
713
|
+
RASTER_SCAN = "raster_scan"
|
714
|
+
S_CURVE = "s_curve"
|
715
|
+
RANDOM = "random"
|
716
|
+
|
717
|
+
|
718
|
+
class OrderingTransformations(StrEnum):
|
719
|
+
ROTATE_90 = "rotate_90"
|
720
|
+
TRANSPOSE = "transpose"
|
721
|
+
REFLECT = "reflect"
|
722
|
+
|
723
|
+
|
724
|
+
class IgniteInfo(StrEnum):
|
725
|
+
"""
|
726
|
+
Config information of the PyTorch ignite package.
|
727
|
+
|
728
|
+
"""
|
729
|
+
|
730
|
+
OPT_IMPORT_VERSION = "0.4.11"
|
731
|
+
|
732
|
+
|
733
|
+
if TYPE_CHECKING:
|
734
|
+
from ignite.engine import EventEnum
|
735
|
+
else:
|
736
|
+
EventEnum, _ = optional_import(
|
737
|
+
"ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "EventEnum", as_type="base"
|
738
|
+
)
|
739
|
+
|
740
|
+
|
720
741
|
class AdversarialIterationEvents(EventEnum):
|
721
742
|
"""
|
722
743
|
Keys used to define events as used in the AdversarialTrainer.
|
@@ -733,15 +754,3 @@ class AdversarialIterationEvents(EventEnum):
|
|
733
754
|
DISCRIMINATOR_LOSS_COMPLETED = "discriminator_loss_completed"
|
734
755
|
DISCRIMINATOR_BACKWARD_COMPLETED = "discriminator_backward_completed"
|
735
756
|
DISCRIMINATOR_MODEL_COMPLETED = "discriminator_model_completed"
|
736
|
-
|
737
|
-
|
738
|
-
class OrderingType(StrEnum):
|
739
|
-
RASTER_SCAN = "raster_scan"
|
740
|
-
S_CURVE = "s_curve"
|
741
|
-
RANDOM = "random"
|
742
|
-
|
743
|
-
|
744
|
-
class OrderingTransformations(StrEnum):
|
745
|
-
ROTATE_90 = "rotate_90"
|
746
|
-
TRANSPOSE = "transpose"
|
747
|
-
REFLECT = "reflect"
|
monai/utils/jupyter_utils.py
CHANGED
monai/utils/module.py
CHANGED
@@ -43,13 +43,11 @@ __all__ = [
|
|
43
43
|
"InvalidPyTorchVersionError",
|
44
44
|
"OptionalImportError",
|
45
45
|
"exact_version",
|
46
|
-
"export",
|
47
46
|
"damerau_levenshtein_distance",
|
48
47
|
"look_up_option",
|
49
48
|
"min_version",
|
50
49
|
"optional_import",
|
51
50
|
"require_pkg",
|
52
|
-
"load_submodules",
|
53
51
|
"instantiate",
|
54
52
|
"get_full_type_name",
|
55
53
|
"get_package_version",
|
@@ -172,28 +170,6 @@ def damerau_levenshtein_distance(s1: str, s2: str) -> int:
|
|
172
170
|
return d[string_1_length - 1, string_2_length - 1]
|
173
171
|
|
174
172
|
|
175
|
-
def export(modname):
|
176
|
-
"""
|
177
|
-
Make the decorated object a member of the named module. This will also add the object under its aliases if it has
|
178
|
-
a `__aliases__` member, thus this decorator should be before the `alias` decorator to pick up those names. Alias
|
179
|
-
names which conflict with package names or existing members will be ignored.
|
180
|
-
"""
|
181
|
-
|
182
|
-
def _inner(obj):
|
183
|
-
mod = import_module(modname)
|
184
|
-
if not hasattr(mod, obj.__name__):
|
185
|
-
setattr(mod, obj.__name__, obj)
|
186
|
-
|
187
|
-
# add the aliases for `obj` to the target module
|
188
|
-
for alias in getattr(obj, "__aliases__", ()):
|
189
|
-
if not hasattr(mod, alias):
|
190
|
-
setattr(mod, alias, obj)
|
191
|
-
|
192
|
-
return obj
|
193
|
-
|
194
|
-
return _inner
|
195
|
-
|
196
|
-
|
197
173
|
def load_submodules(
|
198
174
|
basemod: ModuleType, load_all: bool = True, exclude_pattern: str = "(.*[tT]est.*)|(_.*)"
|
199
175
|
) -> tuple[list[ModuleType], list[str]]:
|
@@ -1,5 +1,5 @@
|
|
1
|
-
monai/__init__.py,sha256=
|
2
|
-
monai/_version.py,sha256
|
1
|
+
monai/__init__.py,sha256=3xB7PrwYLHggh2WFpNAbzY3MQqA0crXLlS8jNEWtecw,4095
|
2
|
+
monai/_version.py,sha256=-ga-_qWT6XVACl55eNJjoMaOVXleLJpCWK4Goh4e1BI,503
|
3
3
|
monai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
monai/_extensions/__init__.py,sha256=NEBPreRhQ8H9gVvgrLr_y52_TmqB96u_u4VQmeNT93I,642
|
5
5
|
monai/_extensions/loader.py,sha256=7SiKw36q-nOzH8CRbBurFrz7GM40GCu7rc93Tm8XpnI,3643
|
@@ -114,11 +114,11 @@ monai/bundle/config_item.py,sha256=rMjXSGkjJZdi04BwSHwCcIwzIb_TflmC3xDhC3SVJRs,1
|
|
114
114
|
monai/bundle/config_parser.py,sha256=cGyEn-cqNk0rEEZ1Qiv6UydmIDvtWZcMVljyfVm5i50,23025
|
115
115
|
monai/bundle/properties.py,sha256=iN3K4FVmN9ny1Hw9p5j7_ULcCdSD8PmrR7qXxbNz49k,11582
|
116
116
|
monai/bundle/reference_resolver.py,sha256=aBw3ML7B_YsiFUNl_mcRYPry1UbrEIK0R39A0zFw8kI,16463
|
117
|
-
monai/bundle/scripts.py,sha256
|
117
|
+
monai/bundle/scripts.py,sha256=ziTH32hd2A00c1wzXzAe2cttCEQtZoDqDx1bCDI1TR0,89136
|
118
118
|
monai/bundle/utils.py,sha256=t-22uFvLn7Yy-dr1v1U33peNOxgAmU4TJiGAbsBrUKs,10108
|
119
119
|
monai/bundle/workflows.py,sha256=KADIppCZY6jCDvyCH2PmJm0Q-6xwCnB7x7KjFfRP8LY,24655
|
120
120
|
monai/config/__init__.py,sha256=CN28CfTdsp301gv8YXfVvkbztCfbAqrLKrJi_C8oP9s,1048
|
121
|
-
monai/config/deviceconfig.py,sha256=
|
121
|
+
monai/config/deviceconfig.py,sha256=f3Xa0OL9kNqdsbZ0PfUEvm6NZivAPh454_VCE8BmsWE,10582
|
122
122
|
monai/config/type_definitions.py,sha256=0fAuI-_uX2Ac_33bgDVXKmBSl-fJNFcsOqBqYV16fhk,3485
|
123
123
|
monai/data/__init__.py,sha256=loDwAMF14hb4HS04SwukoIchIfU6iGY-xPrJVGyVwBo,5167
|
124
124
|
monai/data/box_utils.py,sha256=YbG6lOoYwUGmwcNmoKzq2xnNTbYA4LMkHmfsqteopCg,50102
|
@@ -148,10 +148,10 @@ monai/data/video_dataset.py,sha256=mMTZCkgAx_BBoF4HHWcmEuT9zoNoUVPFtPeYYt76t-A,9
|
|
148
148
|
monai/data/wsi_datasets.py,sha256=Mih4G_rzTQC0Ts8TobnNNXoyCxOAhy0rFqpREDAENWc,18659
|
149
149
|
monai/data/wsi_reader.py,sha256=yVbgl44bS9xF0wsr_ZeLwaljMlTOrtjVTpYKykydEMU,49508
|
150
150
|
monai/engines/__init__.py,sha256=oV0zH5n8qPdCCNZCqLqN4Z7iqADouDtZmtswWQoZWOk,1094
|
151
|
-
monai/engines/evaluator.py,sha256=
|
152
|
-
monai/engines/trainer.py,sha256=
|
153
|
-
monai/engines/utils.py,sha256=
|
154
|
-
monai/engines/workflow.py,sha256=
|
151
|
+
monai/engines/evaluator.py,sha256=gCWZ7QB1DjTeHV9_btHbwR2pew33rxFYOAJ5nPVJfIQ,26934
|
152
|
+
monai/engines/trainer.py,sha256=45aOJ6rhYGgh1awfaNq-ATbaD7ZH8o_yXykyqBcj7q8,38421
|
153
|
+
monai/engines/utils.py,sha256=apQxzU4GxaeHgbNN5Qa6POBuOD2XIMCVzy8DlMcqB1o,15632
|
154
|
+
monai/engines/workflow.py,sha256=S4DCLBSndcaM6LDb6xS-gTL8xCs8fiVejb-8O-pLKeQ,15226
|
155
155
|
monai/fl/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
156
156
|
monai/fl/client/__init__.py,sha256=Wnkcf-Guhi-d29eAH0p51jz1Tn9WSVM4UUGbbb9SAqQ,725
|
157
157
|
monai/fl/client/client_algo.py,sha256=vetQbSNmuvJRBEcu0AKM96gKYbkSXlu4HSriqK7wiiU,5098
|
@@ -161,38 +161,38 @@ monai/fl/utils/constants.py,sha256=OjMAE17niYqQh7nz45SC6CXvkMa4-XZsIuoHUHqP7W0,1
|
|
161
161
|
monai/fl/utils/exchange_object.py,sha256=q41trOwBdog_g3k_Eh2EFnLufHJ1mj7nGyQ-ShuW5Mo,3527
|
162
162
|
monai/fl/utils/filters.py,sha256=InXplYes52JJqtsNbePAPPAYS8am_uRO7UkBHyYyJCo,1633
|
163
163
|
monai/handlers/__init__.py,sha256=laEkiuP-ew7UzuG89135uJvC73ocVbT0nQ_3xMLEhKc,2394
|
164
|
-
monai/handlers/checkpoint_loader.py,sha256=
|
165
|
-
monai/handlers/checkpoint_saver.py,sha256=
|
166
|
-
monai/handlers/classification_saver.py,sha256=
|
164
|
+
monai/handlers/checkpoint_loader.py,sha256=Y0qNBq5b-GJ-XOJNjuslegCpIGPZYOdNs3PxzNYCCm8,7432
|
165
|
+
monai/handlers/checkpoint_saver.py,sha256=z_w5HtNSeRM3QwHQIgQKqVodSYNy8dhL8KTBUzHuF0g,16047
|
166
|
+
monai/handlers/classification_saver.py,sha256=CNzdU9GrKj8KEC42jaBy2rEgpd3mqgz-YZg4dr61Jyg,7605
|
167
167
|
monai/handlers/clearml_handlers.py,sha256=ce3ftDZ9B2dPrP_2xw0D5kFxDNJODKDuTvDMYm5uyoI,7518
|
168
168
|
monai/handlers/confusion_matrix.py,sha256=KpdTV0ViWDRnvVUb58Lc4UBhGwyU_Pf5wTpSaSyVH3o,4006
|
169
|
-
monai/handlers/decollate_batch.py,sha256
|
170
|
-
monai/handlers/earlystop_handler.py,sha256=
|
171
|
-
monai/handlers/garbage_collector.py,sha256=
|
169
|
+
monai/handlers/decollate_batch.py,sha256=-4hFPT4ZCiApbnUVplm8c6uQ326bKgPtkiYopjQRcTA,4425
|
170
|
+
monai/handlers/earlystop_handler.py,sha256=bwCswTyCzFpU23-ONFeg4X10BI3Vdtkzn5-a72M09H0,5310
|
171
|
+
monai/handlers/garbage_collector.py,sha256=JbyBjru1wB-G1CNMopQlegC81FH3W2GpuWngfUPut44,3621
|
172
172
|
monai/handlers/hausdorff_distance.py,sha256=i-I2EWZrCpkojPR5EmqWCOiDCszujoe5RCZ4xUDajcc,3594
|
173
|
-
monai/handlers/ignite_metric.py,sha256=
|
174
|
-
monai/handlers/logfile_handler.py,sha256=
|
175
|
-
monai/handlers/lr_schedule_handler.py,sha256=
|
173
|
+
monai/handlers/ignite_metric.py,sha256=PSgjSPaJ7nOhaXDewTJucXDhkYVJhSz_qQ36qA-G7PM,6691
|
174
|
+
monai/handlers/logfile_handler.py,sha256=y-If8rStdD5lh_NZX68aTpSDbYGchGIf6f0VaWFPkBI,3907
|
175
|
+
monai/handlers/lr_schedule_handler.py,sha256=jEv1QnPkhwpQO1azFvzhL-us4ywP9kVmQb5man88evA,3551
|
176
176
|
monai/handlers/mean_dice.py,sha256=aJmL9IEEJtWs65Et3HCe7S0JIe7J6z-Nc0BEQESy9sY,3785
|
177
177
|
monai/handlers/mean_iou.py,sha256=-4vDqYx-Zd77PcR2-Wg6X-M35n13sMV5VysGiDCvjbQ,2841
|
178
|
-
monai/handlers/metric_logger.py,sha256=
|
178
|
+
monai/handlers/metric_logger.py,sha256=Zk55yO5PlwM7WhHPelHPfv3WLuJycxLrtQMwjEJ_7FQ,5453
|
179
179
|
monai/handlers/metrics_reloaded_handler.py,sha256=9JtfWeDvjrdKNMKpRJQBu0k6XGxg8hfOm6224sB4A6E,6195
|
180
|
-
monai/handlers/metrics_saver.py,sha256=
|
181
|
-
monai/handlers/mlflow_handler.py,sha256=
|
182
|
-
monai/handlers/nvtx_handlers.py,sha256=
|
180
|
+
monai/handlers/metrics_saver.py,sha256=ltXaaj3C4Vzv3VEWT4O7wlmuYs7JHi7qCkXXfVBgPb8,8559
|
181
|
+
monai/handlers/mlflow_handler.py,sha256=rq8qu3UPb4tMGTek146n2xmZ6b7LhI2SLRYxft8JNeA,23209
|
182
|
+
monai/handlers/nvtx_handlers.py,sha256=cD-nYVaJ7fUEUmr5zLU9-s867SqUwP64R3i4Rui5MGU,6795
|
183
183
|
monai/handlers/panoptic_quality.py,sha256=Dr_cMANJne1Cvc_pnI33QAUMAVKbkO4NBfTFjedGZOE,3651
|
184
|
-
monai/handlers/parameter_scheduler.py,sha256=
|
185
|
-
monai/handlers/postprocessing.py,sha256=
|
186
|
-
monai/handlers/probability_maps.py,sha256=
|
184
|
+
monai/handlers/parameter_scheduler.py,sha256=JMVMEWnF0sUejynB_J_2fL9OKJT_s-ZbaYEucTeb1Hk,7095
|
185
|
+
monai/handlers/postprocessing.py,sha256=KlMl4kUKn0Z0VdiOFG7N_BxNIo7x9sm6yOc42mXGbR8,3261
|
186
|
+
monai/handlers/probability_maps.py,sha256=ggvgebTlx-r5BmcpiYu5MTF00AMtSMghRA8Orw9o7uI,5336
|
187
187
|
monai/handlers/regression_metrics.py,sha256=PaL8AXLhl7Aw5C1_VSPIAt2C8H781ek_sPD_xFZgWPA,8457
|
188
188
|
monai/handlers/roc_auc.py,sha256=0A_Y1bvRpkBY0l5HyTRKopUUupq0cMGubnqgflHXA2g,2744
|
189
|
-
monai/handlers/smartcache_handler.py,sha256=
|
190
|
-
monai/handlers/stats_handler.py,sha256=
|
189
|
+
monai/handlers/smartcache_handler.py,sha256=PwWmLYKBWFTkOdcQXlML18AESWtQnPJl9Ici9djvdTE,3027
|
190
|
+
monai/handlers/stats_handler.py,sha256=B2XOPadbLqUEknxF82MiZVWa1B2dseLXw6XRuHZMerg,14102
|
191
191
|
monai/handlers/surface_distance.py,sha256=HKQrRGy08uWNr9X-mJ1IhMwV_ndZOijEJS7TYL9KQsg,3327
|
192
|
-
monai/handlers/tensorboard_handlers.py,sha256=
|
193
|
-
monai/handlers/trt_handler.py,sha256=
|
194
|
-
monai/handlers/utils.py,sha256=
|
195
|
-
monai/handlers/validation_handler.py,sha256=
|
192
|
+
monai/handlers/tensorboard_handlers.py,sha256=3nju_xEJeOpCtObrIfuWc1u8dSRwjs-26tyh06FP8wg,22591
|
193
|
+
monai/handlers/trt_handler.py,sha256=uWFdgC8QKRkcNwWfKIbQMdK6-MX_1ON0mKabeIn1ltI,2329
|
194
|
+
monai/handlers/utils.py,sha256=Ib1u-PLrtIkiLqTfREnrCWpN4af1btdNzkyMZuuuYyU,10239
|
195
|
+
monai/handlers/validation_handler.py,sha256=NZO21c6zzXbmAgJZHkkdoZQSQIHwuxh94QD3PLUldGU,3674
|
196
196
|
monai/inferers/__init__.py,sha256=K74t_RCeUPdEZvHzIPzVAwZ9DtmouLqhb3qDEmFBWs4,1107
|
197
197
|
monai/inferers/inferer.py,sha256=aZwCmM6WGj49SHi_jIkQeGDstMz45frvM1Lomoeqzm4,92669
|
198
198
|
monai/inferers/merger.py,sha256=Ch-qoGUVTTDWN9z_LXBRxElvyuZxOmuqAcecpg1xxAg,15566
|
@@ -308,7 +308,7 @@ monai/networks/nets/flexible_unet.py,sha256=VN3cJQPMmY--TpZkuDwEWonPgJc4R3JKBwJC
|
|
308
308
|
monai/networks/nets/fullyconnectednet.py,sha256=j5uo68qnYSxgH_sEMRh7s3QGNKFaJAIxmx8OixEv2Ig,7212
|
309
309
|
monai/networks/nets/generator.py,sha256=q20EAl9N7Q56t78JiZaUEkPhYWyD02oqO0yekJCd9x0,6581
|
310
310
|
monai/networks/nets/highresnet.py,sha256=1Mx8lR5K4sRXGWjspDAHaKq0WrX9Q7qz8CcBCKZxIXk,8883
|
311
|
-
monai/networks/nets/hovernet.py,sha256=
|
311
|
+
monai/networks/nets/hovernet.py,sha256=gQDeDGqCwjJACTPmQLAx9nPRBO_D65F-scx15w3Ho_Q,28645
|
312
312
|
monai/networks/nets/milmodel.py,sha256=aUDgYJG0kS3p4nBW_dF7b4cWwuC31w3KIzmUzXA08HE,9813
|
313
313
|
monai/networks/nets/netadapter.py,sha256=JtcME9pcg8ud4jHKZKM9fE-8leP2PQXgUIfKBdB0wcA,6102
|
314
314
|
monai/networks/nets/patchgan_discriminator.py,sha256=yTT0on0lzlDwSu4B9McMqdxqu5xD7Ws9wCwEkxvJEu0,8620
|
@@ -326,14 +326,14 @@ monai/networks/nets/swin_unetr.py,sha256=nU_VgVsgPnXx5V_Wtceq1ZJR1XuB4vPCcFnbY5p
|
|
326
326
|
monai/networks/nets/torchvision_fc.py,sha256=3g5PD7C1MSkQ8xndhnVd0b3aN8zfshT8uiFS0OHyQaY,6309
|
327
327
|
monai/networks/nets/transchex.py,sha256=uA_RfTDfPhwA1ecAPZ9EDnMyJKn2tUMLEWdyB_rU2v0,15726
|
328
328
|
monai/networks/nets/transformer.py,sha256=-nzl20Z5xdtn7xChOd_cRbbPVoPIFGVfTQw3fIEGMuE,6395
|
329
|
-
monai/networks/nets/unet.py,sha256=
|
329
|
+
monai/networks/nets/unet.py,sha256=t2an-NZ8QRpWal6uh1WpxG1tbekKRDgQtpT7YeXWFvY,13543
|
330
330
|
monai/networks/nets/unetr.py,sha256=G67kjiBMz13MzP4eV8XK-GydSogMwgXaBMFDShF5sB8,8252
|
331
331
|
monai/networks/nets/varautoencoder.py,sha256=Pd9BdXW1iVjmAVCZIc2ElGtSDAWRBaLwEKxLDicyxZI,6282
|
332
332
|
monai/networks/nets/vista3d.py,sha256=vFpCG53JDCvgK-fz7VPZvo6-mv8Mp5AgBZu2QVu0ggM,43326
|
333
333
|
monai/networks/nets/vit.py,sha256=yEzFFQln5ieknnF8A1_ecB_c0SuOBBnrXPesm_kzVts,5934
|
334
334
|
monai/networks/nets/vitautoenc.py,sha256=vfQBWjTb0k7EY4uC76rmuOCIUUgeBvf_EIXBofCzVHQ,5740
|
335
335
|
monai/networks/nets/vnet.py,sha256=zaJi5kSiTLAuFHThSZfhJvHP6zKh3oBWsTWG-328O_g,10820
|
336
|
-
monai/networks/nets/voxelmorph.py,sha256=
|
336
|
+
monai/networks/nets/voxelmorph.py,sha256=Q5VQFLLKSFqhsG0Z8_72ZGfK1nA4kdCfFnGbqI6Eofg,20665
|
337
337
|
monai/networks/nets/vqvae.py,sha256=Zf9fTL_rluhuJhH6gTNB6iiKRfwBxfuuyhCdU9TLmAk,18417
|
338
338
|
monai/networks/schedulers/__init__.py,sha256=rPmrNvnt8Bh9D2omPMgDiGVuT1XVJlgtlWIlqA_sjb4,755
|
339
339
|
monai/networks/schedulers/ddim.py,sha256=a01QajgWksTYsPxs4DuBzy59mE_PcyTJedd6VqJv5g0,14376
|
@@ -346,7 +346,7 @@ monai/optimizers/lr_scheduler.py,sha256=YPY5MWgCTmExuIOBsVJrgfErkCT1ELBekcH0XeRP
|
|
346
346
|
monai/optimizers/novograd.py,sha256=dgjyM-WGqrEHsSKNdI3Lw1wJ2YNG3oKCYotfPsDBE80,5677
|
347
347
|
monai/optimizers/utils.py,sha256=GVsJsZWO2aAP9IzwhXgca_9gUNHFClup6qG4ZFs42z4,4133
|
348
348
|
monai/transforms/__init__.py,sha256=lyIf64v-I2soIjfK2RxOWS7_CIc-x6bRJHLI6UZ8yDs,16591
|
349
|
-
monai/transforms/adaptors.py,sha256=
|
349
|
+
monai/transforms/adaptors.py,sha256=LpYChldlOur-VFgu_nBIBze0J841-NWgf0UHvvHRNPU,8796
|
350
350
|
monai/transforms/compose.py,sha256=zQa_hf8gIater3Bo_XW1IVYgX7aFa_Co6-BZPwoeaQw,37663
|
351
351
|
monai/transforms/inverse.py,sha256=Wg8UnMJru41G3eHGipUemAWziHGU-qdd-Flfi3eOpeo,18746
|
352
352
|
monai/transforms/inverse_batch_transform.py,sha256=fMbukZq2P99BhqqMuWZFJ9uboZ5dN61MBvvicwf40V0,7055
|
@@ -363,7 +363,7 @@ monai/transforms/croppad/batch.py,sha256=5ukcYk3VCDpk62AL5Q_jTqpXmSNTlw0UCUhDeAB
|
|
363
363
|
monai/transforms/croppad/dictionary.py,sha256=WOzj_PjmoB3zLEmtQlafb9-PWgXd-s5K7Z5Doc8Adns,60746
|
364
364
|
monai/transforms/croppad/functional.py,sha256=iroD0XBaMG1Mox6-EotIh2nAUxJPrpIyUrHopc83Sug,12640
|
365
365
|
monai/transforms/intensity/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
366
|
-
monai/transforms/intensity/array.py,sha256=
|
366
|
+
monai/transforms/intensity/array.py,sha256=SpG3u9LPuQxDk77lEvPC4-tH1tiOtacDDfcyQydIhkI,121592
|
367
367
|
monai/transforms/intensity/dictionary.py,sha256=RXZeQG9dPvdvjoiWWlNkYec4NDWBxYXjfct4fywv1Ic,85059
|
368
368
|
monai/transforms/io/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
369
369
|
monai/transforms/io/array.py,sha256=z4aOxK44IhztN-LzG2uROYDwg_u1C6gcpx9ZH-ZhoVA,27482
|
@@ -394,16 +394,15 @@ monai/transforms/spatial/functional.py,sha256=IwS0witCqbGkyuxzu_R4Ztp90S0pg9hY1i
|
|
394
394
|
monai/transforms/utility/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
395
395
|
monai/transforms/utility/array.py,sha256=MCkoccxLStPX2e0bJv6WZzDsGE3Wwf1DaxU1MZwDp08,78086
|
396
396
|
monai/transforms/utility/dictionary.py,sha256=bPO6qJcZwT_phtVpTLT0VvblGL-QnyYG1bYGIpAjOzk,78079
|
397
|
-
monai/utils/__init__.py,sha256=
|
398
|
-
monai/utils/aliases.py,sha256=uBxkLudRfy3Rts9RZo4NDPGoq4e3Ymcaihk6lT92GFo,4096
|
397
|
+
monai/utils/__init__.py,sha256=9E59iRxectI0rD5_Loj-fnt24BnaDvPlPplu5jRFcFM,3743
|
399
398
|
monai/utils/component_store.py,sha256=VMF7CtPu5Wi_eX_qFtm9iWo5kvoWFuCUIxdRzk90zZo,4498
|
400
399
|
monai/utils/decorators.py,sha256=YRK5iEMdbc2INrWnBNDSMTaHge_0ezRf2b9yJGL-opg,3129
|
401
400
|
monai/utils/deprecate_utils.py,sha256=gKeEV4MsI51qeQ5gci2me_C-0e-tDwa3VZzd3XPQqLk,14759
|
402
|
-
monai/utils/dist.py,sha256=
|
403
|
-
monai/utils/enums.py,sha256=
|
404
|
-
monai/utils/jupyter_utils.py,sha256=
|
401
|
+
monai/utils/dist.py,sha256=QUVRusnAdiySK_dnTrDWqxNMl4XU4pwzvlMaGsvVE3Y,8644
|
402
|
+
monai/utils/enums.py,sha256=orCV7SGDajYtl3DhTTjbLDbayr6WxkMSw_bZ6yeGGTY,19513
|
403
|
+
monai/utils/jupyter_utils.py,sha256=kQqfLTLAre3TLzXTt091X_XeWy5K0QKAcTuYlJ8BOag,15650
|
405
404
|
monai/utils/misc.py,sha256=4KCY-Kmlzjup3KE2bgJsjIItKdDMxXwA0_rH1ghHONE,31410
|
406
|
-
monai/utils/module.py,sha256=
|
405
|
+
monai/utils/module.py,sha256=ICsVqQMV-069FuVwjCHm3d3hyvIOx9El17IXZ-2sfQk,24319
|
407
406
|
monai/utils/nvtx.py,sha256=i9JBxR1uhW1ZCgLPLlTx8b907QlXkFzJyTBLMlFjhtU,6876
|
408
407
|
monai/utils/ordering.py,sha256=0nlA5b5QpVCHbtiCbTC-YsqjTmjm0bub0IeJhGFBOes,8270
|
409
408
|
monai/utils/profiling.py,sha256=V2_cSHgrcmVF48_G3nUi2-O6fnXsS89nSlb8jj58YLo,15937
|
@@ -417,8 +416,8 @@ monai/visualize/img2tensorboard.py,sha256=NnMcyfIFqX-jD7TBO3Rn02zt5uug79d_7pIIaV
|
|
417
416
|
monai/visualize/occlusion_sensitivity.py,sha256=OQHEJLyIhB8zWqQsfKaX-1kvCjWFVYtLfS4dFC0nKFI,18160
|
418
417
|
monai/visualize/utils.py,sha256=B-MhTVs7sQbIqYS3yPnpBwPw2K82rE2PBtGIfpwZtWM,9894
|
419
418
|
monai/visualize/visualizer.py,sha256=qckyaMZCbezYUwE20k5yc-Pb7UozVavMDbrmyQwfYHY,1377
|
420
|
-
monai_weekly-1.4.
|
421
|
-
monai_weekly-1.4.
|
422
|
-
monai_weekly-1.4.
|
423
|
-
monai_weekly-1.4.
|
424
|
-
monai_weekly-1.4.
|
419
|
+
monai_weekly-1.4.dev2440.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
420
|
+
monai_weekly-1.4.dev2440.dist-info/METADATA,sha256=_3k44c2ZfHiPSK9L-fDB3FhQP03fWtqUbjC-G1oa2q4,11172
|
421
|
+
monai_weekly-1.4.dev2440.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
422
|
+
monai_weekly-1.4.dev2440.dist-info/top_level.txt,sha256=UaNwRzLGORdus41Ip446s3bBfViLkdkDsXDo34J2P44,6
|
423
|
+
monai_weekly-1.4.dev2440.dist-info/RECORD,,
|
monai/utils/aliases.py
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-
# Copyright (c) MONAI Consortium
|
2
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
-
# you may not use this file except in compliance with the License.
|
4
|
-
# You may obtain a copy of the License at
|
5
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
# Unless required by applicable law or agreed to in writing, software
|
7
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
8
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
9
|
-
# See the License for the specific language governing permissions and
|
10
|
-
# limitations under the License.
|
11
|
-
"""
|
12
|
-
This module is written for configurable workflow, not currently in use.
|
13
|
-
"""
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
|
17
|
-
import importlib
|
18
|
-
import inspect
|
19
|
-
import sys
|
20
|
-
import threading
|
21
|
-
|
22
|
-
alias_lock = threading.RLock()
|
23
|
-
GlobalAliases = {}
|
24
|
-
|
25
|
-
__all__ = ["alias", "resolve_name"]
|
26
|
-
|
27
|
-
|
28
|
-
def alias(*names):
|
29
|
-
"""
|
30
|
-
Stores the decorated function or class in the global aliases table under the given names and as the `__aliases__`
|
31
|
-
member of the decorated object. This new member will contain all alias names declared for that object.
|
32
|
-
"""
|
33
|
-
|
34
|
-
def _outer(obj):
|
35
|
-
for n in names:
|
36
|
-
with alias_lock:
|
37
|
-
GlobalAliases[n] = obj
|
38
|
-
|
39
|
-
# set the member list __aliases__ to contain the alias names defined by the decorator for `obj`
|
40
|
-
obj.__aliases__ = getattr(obj, "__aliases__", ()) + tuple(names)
|
41
|
-
|
42
|
-
return obj
|
43
|
-
|
44
|
-
return _outer
|
45
|
-
|
46
|
-
|
47
|
-
def resolve_name(name):
|
48
|
-
"""
|
49
|
-
Search for the declaration (function or class) with the given name. This will first search the list of aliases to
|
50
|
-
see if it was declared with this aliased name, then search treating `name` as a fully qualified name, then search
|
51
|
-
the loaded modules for one having a declaration with the given name. If no declaration is found, raise ValueError.
|
52
|
-
|
53
|
-
Raises:
|
54
|
-
ValueError: When the module is not found.
|
55
|
-
ValueError: When the module does not have the specified member.
|
56
|
-
ValueError: When multiple modules with the declaration name are found.
|
57
|
-
ValueError: When no module with the specified member is found.
|
58
|
-
|
59
|
-
"""
|
60
|
-
# attempt to resolve an alias
|
61
|
-
with alias_lock:
|
62
|
-
obj = GlobalAliases.get(name)
|
63
|
-
|
64
|
-
if name in GlobalAliases and obj is None:
|
65
|
-
raise AssertionError
|
66
|
-
|
67
|
-
# attempt to resolve a qualified name
|
68
|
-
if obj is None and "." in name:
|
69
|
-
modname, declname = name.rsplit(".", 1)
|
70
|
-
|
71
|
-
try:
|
72
|
-
mod = importlib.import_module(modname)
|
73
|
-
obj = getattr(mod, declname, None)
|
74
|
-
except ModuleNotFoundError as not_found_err:
|
75
|
-
raise ValueError(f"Module {modname!r} not found.") from not_found_err
|
76
|
-
|
77
|
-
if obj is None:
|
78
|
-
raise ValueError(f"Module {modname!r} does not have member {declname!r}.")
|
79
|
-
|
80
|
-
# attempt to resolve a simple name
|
81
|
-
if obj is None:
|
82
|
-
# Get all modules having the declaration/import, need to check here that getattr returns something which doesn't
|
83
|
-
# equate to False since in places __getattr__ returns 0 incorrectly:
|
84
|
-
# https://github.com/tensorflow/tensorboard/blob/a22566561d2b4fea408755a951ac9eaf3a156f8e/
|
85
|
-
# tensorboard/compat/tensorflow_stub/pywrap_tensorflow.py#L35
|
86
|
-
mods = [m for m in list(sys.modules.values()) if getattr(m, name, None)]
|
87
|
-
|
88
|
-
if len(mods) > 0: # found modules with this declaration or import
|
89
|
-
if len(mods) > 1: # found multiple modules, need to determine if ambiguous or just multiple imports
|
90
|
-
foundmods = set(filter(None, {inspect.getmodule(getattr(m, name)) for m in mods})) # resolve imports
|
91
|
-
|
92
|
-
if len(foundmods) > 1: # found multiple declarations with the same name
|
93
|
-
modnames = [m.__name__ for m in foundmods]
|
94
|
-
msg = f"Multiple modules ({modnames!r}) with declaration name {name!r} found, resolution is ambiguous."
|
95
|
-
raise ValueError(msg)
|
96
|
-
mods = list(foundmods)
|
97
|
-
|
98
|
-
obj = getattr(mods[0], name)
|
99
|
-
|
100
|
-
if obj is None:
|
101
|
-
raise ValueError(f"No module with member {name!r} found.")
|
102
|
-
|
103
|
-
return obj
|
File without changes
|
File without changes
|
File without changes
|