W&B: DDP fix (#5176)
Browse files* fix dpp with wandb disabled
* PyCharm reformat
* Fix
* fix
Co-authored-by: Glenn Jocher <[email protected]>
utils/loggers/wandb/wandb_utils.py
CHANGED
@@ -19,6 +19,13 @@ from utils.datasets import LoadImagesAndLabels
|
|
19 |
from utils.datasets import img2label_paths
|
20 |
from utils.general import check_dataset, check_file
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
RANK = int(os.getenv('RANK', -1))
|
23 |
WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
|
24 |
|
|
|
19 |
from utils.datasets import img2label_paths
|
20 |
from utils.general import check_dataset, check_file
|
21 |
|
22 |
+
try:
|
23 |
+
import wandb
|
24 |
+
|
25 |
+
assert hasattr(wandb, '__version__') # verify package import not local dir
|
26 |
+
except (ImportError, AssertionError):
|
27 |
+
wandb = None
|
28 |
+
|
29 |
RANK = int(os.getenv('RANK', -1))
|
30 |
WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
|
31 |
|