Skip to content

Commit 9656e43

Browse files
committed
Removed comments from pkg_resources
1 parent 94195e9 commit 9656e43

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

monai/utils/module.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ def version_leq(lhs: str, rhs: str) -> bool:
569569

570570
lhs, rhs = str(lhs), str(rhs)
571571
pkging, has_ver = optional_import("packaging", name="packaging")
572-
# pkging, has_ver = optional_import("pkg_resources", name="packaging")
573572
if has_ver:
574573
try:
575574
return cast(bool, version(lhs) <= version(rhs))
@@ -599,7 +598,6 @@ def version_geq(lhs: str, rhs: str) -> bool:
599598
"""
600599
lhs, rhs = str(lhs), str(rhs)
601600
pkging, has_ver = optional_import("packaging", name="packaging")
602-
# pkging, has_ver = optional_import("pkg_resources", name="packaging")
603601
if has_ver:
604602
try:
605603
return cast(bool, version(lhs) >= version(rhs))
@@ -640,7 +638,6 @@ def pytorch_after(major: int, minor: int, patch: int = 0, current_ver_string: st
640638
_env_var = os.environ.get("PYTORCH_VER", "")
641639
current_ver_string = _env_var if _env_var else torch.__version__
642640
ver, has_ver = optional_import("packaging.version", name="parse")
643-
# ver, has_ver = optional_import("pkg_resources", name="parse_version")
644641
if has_ver:
645642
return ver(".".join((f"{major}", f"{minor}", f"{patch}"))) <= ver(f"{current_ver_string}") # type: ignore
646643
parts = f"{current_ver_string}".split("+", 1)[0].split(".", 3)

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import sys
1818
import warnings
1919

20-
# import pkg_resources
2120
from packaging import version
2221
from setuptools import find_packages, setup
2322

@@ -41,7 +40,6 @@
4140

4241
BUILD_CUDA = FORCE_CUDA or (torch.cuda.is_available() and (CUDA_HOME is not None))
4342

44-
# _pt_version = pkg_resources.parse_version(torch.__version__).release
4543
_pt_version = version.parse(torch.__version__).release
4644
if _pt_version is None or len(_pt_version) < 3:
4745
raise AssertionError("unknown torch version")

0 commit comments

Comments
 (0)