From ed0fdeec2092c994190577d49b88aab991054b94 Mon Sep 17 00:00:00 2001 From: YunLiu <55491388+KumoLiu@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:26:51 +0800 Subject: [PATCH] Fix ImportError for IgniteInfo (#1747) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix ignite-info issue Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * update monai version Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * revert version change Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * temp fix Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * minor fix Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * minor fix Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * update to 3.9 and drop 3.8 Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (#1716) updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/psf/black: 24.3.0 → 24.4.2](https://github.com/psf/black/compare/24.3.0...24.4.2) - [github.com/psf/black: 24.3.0 → 24.4.2](https://github.com/psf/black/compare/24.3.0...24.4.2) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](https://github.com/PyCQA/flake8/compare/7.0.0...7.1.0) - [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.9.0...v1.10.1) - [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](https://github.com/asottile/pyupgrade/compare/v3.15.2...v3.16.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: SACHIDANAND ALLE Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Bump urllib3 from 2.2.1 to 2.2.2 (#1753) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Bump requests from 2.31.0 to 2.32.2 (#1754) Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.2. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.31.0...v2.32.2) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * ENH: Allow newer version of dependencies (#1748) Pinning basic packages such as "requests" to a specific patch level release such "2.31.0" is too strict. New releases and especially new patch releases allow to use latest security updates of various packages. Signed-off-by: James Butler Co-authored-by: SACHIDANAND ALLE Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Release 0.8.4 checks and updates (#1757) * Release 0.8.4 checks and updates Signed-off-by: tangy5 * Trigger monai container update Signed-off-by: tangy5 * Drop python 3.8 Signed-off-by: tangy5 * Drop python 3.8 Signed-off-by: tangy5 --------- Signed-off-by: tangy5 Co-authored-by: tangy5 Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Add MITK as supported platform (#1759) Signed-off-by: Ashis Ravindran Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Add MITK to installation docs (#1761) * Add MITK as supported platform Signed-off-by: Ashis Ravindran * Update link to MONAI Label repo Signed-off-by: Ashis Ravindran * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Ashis Ravindran Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * fix(mode): no need to initialize toolbar service (#1763) Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * BUG: Fix traceback in restored transform (#1766) Using transforms from MONAI and MONAILabel can result in metadata containing torch.tensors and torch.Sizes. This change fixes a traceback in the restored transform resulting from an incompatibility between torch datatypes and numpy.any(). Signed-off-by: Thomas Kierski Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * Revert "update to 3.9 and drop 3.8" This reverts commit 8ced475bbcbbd15eb316f992201d4d1562d5fbc4. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * revert Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * revert Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> * revert Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> --------- Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Signed-off-by: dependabot[bot] Signed-off-by: James Butler Signed-off-by: tangy5 Signed-off-by: Ashis Ravindran Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: SACHIDANAND ALLE Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: James Butler Co-authored-by: tangy5 <58751975+tangy5@users.noreply.github.com> Co-authored-by: tangy5 Co-authored-by: Ashis Ravindran <33703127+ASHISRAVINDRAN@users.noreply.github.com> Co-authored-by: Alireza Co-authored-by: Thomas Kierski <54414492+ThomasKierski@users.noreply.github.com> --- monailabel/deepedit/handlers.py | 3 +-- sample-apps/pathology/lib/handlers.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/monailabel/deepedit/handlers.py b/monailabel/deepedit/handlers.py index 93fd94799..369324bd9 100644 --- a/monailabel/deepedit/handlers.py +++ b/monailabel/deepedit/handlers.py @@ -13,8 +13,7 @@ import numpy as np import torch -from monai.config import IgniteInfo -from monai.utils import min_version, optional_import +from monai.utils import IgniteInfo, min_version, optional_import from monai.visualize import plot_2d_or_3d_image from torch import distributed as dist from torchvision.utils import make_grid diff --git a/sample-apps/pathology/lib/handlers.py b/sample-apps/pathology/lib/handlers.py index 4e22b4e6c..afaf3ef1d 100644 --- a/sample-apps/pathology/lib/handlers.py +++ b/sample-apps/pathology/lib/handlers.py @@ -17,9 +17,8 @@ import numpy as np import torch import torch.distributed -from monai.config import IgniteInfo from monai.metrics import compute_dice -from monai.utils import min_version, optional_import +from monai.utils import IgniteInfo, min_version, optional_import Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events") make_grid, _ = optional_import("torchvision.utils", name="make_grid")