Skip to content

Commit

Permalink
Fix ClearML unconfigured error (#10369)
Browse files Browse the repository at this point in the history
@thepycoder adds Try Except for installed but unconfigured clearml environments.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher committed Dec 1, 2022
1 parent 1ce464f commit 7845cea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/loggers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@ def __init__(self, save_dir=None, weights=None, opt=None, hyp=None, logger=None,

# ClearML
if clearml and 'clearml' in self.include:
self.clearml = ClearmlLogger(self.opt, self.hyp)
try:
self.clearml = ClearmlLogger(self.opt, self.hyp)
except Exception:
self.clearml = None
prefix = colorstr('ClearML: ')
LOGGER.warning(f'{prefix}WARNING ⚠️ ClearML is installed but not configured, skipping ClearML logging.'
f' See https://github.com/ultralytics/yolov5/tree/master/utils/loggers/clearml#readme')

else:
self.clearml = None

Expand Down

0 comments on commit 7845cea

Please sign in to comment.