Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IgniteInfo can not import issue #8121

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions monai/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .deviceconfig import (
USE_COMPILED,
USE_META_DICT,
IgniteInfo,
get_config_values,
get_gpu_info,
get_optional_config_values,
Expand Down
9 changes: 9 additions & 0 deletions monai/config/deviceconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import torch

import monai
from monai.utils.deprecate_utils import deprecated
from monai.utils.enums import IgniteInfo as _IgniteInfo
from monai.utils.module import OptionalImportError, get_package_version, optional_import

try:
Expand Down Expand Up @@ -260,5 +262,12 @@ def print_debug_info(file: TextIO = sys.stdout) -> None:
print_gpu_info(file)


@deprecated(since="1.4.0", removed="1.6.0", msg_suffix="Please use `monai.utils.enums.IgniteInfo` instead.")
class IgniteInfo:
"""Deprecated Import of IgniteInfo enum, which was moved to `monai.utils.enums.IgniteInfo`."""

OPT_IMPORT_VERSION = _IgniteInfo.OPT_IMPORT_VERSION


if __name__ == "__main__":
print_debug_info()
2 changes: 1 addition & 1 deletion monai/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class IgniteInfo(StrEnum):

"""

OPT_IMPORT_VERSION = "0.4.4"
OPT_IMPORT_VERSION = "0.4.11"


if TYPE_CHECKING:
Expand Down
Loading