Skip to content

Commit

Permalink
W&B: DDP fix (ultralytics#5176)
Browse files Browse the repository at this point in the history
* fix dpp with wandb disabled

* PyCharm reformat

* Fix

* fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
AyushExel and glenn-jocher committed Oct 14, 2021
1 parent c70113b commit 5563986
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/loggers/wandb/wandb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
from utils.datasets import img2label_paths
from utils.general import check_dataset, check_file

try:
import wandb

assert hasattr(wandb, '__version__') # verify package import not local dir
except (ImportError, AssertionError):
wandb = None

RANK = int(os.getenv('RANK', -1))
WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'

Expand Down

0 comments on commit 5563986

Please sign in to comment.