Skip to content

Commit 3fb1111

Browse files
authored
Replace pkg_resources with packaging (#13707)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
1 parent dd2e257 commit 3fb1111

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utils/loggers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import warnings
77
from pathlib import Path
88

9-
import pkg_resources as pkg
109
import torch
10+
from packaging.version import parse
1111

1212
from utils.general import LOGGER, colorstr, cv2
1313
from utils.loggers.clearml.clearml_utils import ClearmlLogger
@@ -31,7 +31,7 @@ def SummaryWriter(*args):
3131
import wandb
3232

3333
assert hasattr(wandb, "__version__") # verify package import not local dir
34-
if pkg.parse_version(wandb.__version__) >= pkg.parse_version("0.12.2") and RANK in {0, -1}:
34+
if parse(wandb.__version__) >= parse("0.12.2") and RANK in {0, -1}:
3535
try:
3636
wandb_login_success = wandb.login(timeout=30)
3737
except wandb.errors.UsageError: # known non-TTY terminal issue

0 commit comments

Comments
 (0)