From b638a2063a737b1f09f22ed4c2e6d60d36ed94ae Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 14 Apr 2023 20:55:25 +0200 Subject: [PATCH 1/3] Update requirements.txt comment tensorboard Signed-off-by: Glenn Jocher --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index baf7a2757f1d..e1d98a82ceac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ tqdm>=4.64.0 # protobuf<=3.20.1 # https://github.com/ultralytics/yolov5/issues/8012 # Logging --------------------------------------------------------------------- -tensorboard>=2.4.1 +# tensorboard>=2.4.1 # clearml>=1.2.0 # comet From 8323e4d350b0a867706b2e3cbb602e7d23f0bbc6 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 15 Apr 2023 00:44:11 +0200 Subject: [PATCH 2/3] Make tensorboard optional --- utils/loggers/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index d428cdba6196..0b7ebbfdba4f 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -9,7 +9,6 @@ import pkg_resources as pkg import torch -from torch.utils.tensorboard import SummaryWriter from utils.general import LOGGER, colorstr, cv2 from utils.loggers.clearml.clearml_utils import ClearmlLogger @@ -20,6 +19,11 @@ LOGGERS = ('csv', 'tb', 'wandb', 'clearml', 'comet') # *.csv, TensorBoard, Weights & Biases, ClearML RANK = int(os.getenv('RANK', -1)) +try: + from torch.utils.tensorboard import SummaryWriter +except ImportError: + SummaryWriter = lambda *x: None # None = SummaryWriter(str) + try: import wandb From 89480739c901f476b2ae1d9a308a20d1de422b7e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 15 Apr 2023 00:45:24 +0200 Subject: [PATCH 3/3] Update __init__.py Signed-off-by: Glenn Jocher --- utils/loggers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index 0b7ebbfdba4f..9b4c1d13b778 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -22,7 +22,7 @@ try: from torch.utils.tensorboard import SummaryWriter except ImportError: - SummaryWriter = lambda *x: None # None = SummaryWriter(str) + SummaryWriter = lambda *args: None # None = SummaryWriter(str) try: import wandb