W&B: DDP fix (#5176)

* fix dpp with wandb disabled

* PyCharm reformat

* Fix

* fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Ayush ChaurasiaandGlenn Jocher authored and GitHub committed 2021-10-13 20:11:04 -07:00
1 parent e520e820f1
commit 1172ac15fb
1 file changed
+7
+7
View File
@@ -19,6 +19,13 @@ from utils.datasets import LoadImagesAndLabels
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://'