W&B: Login only in master processes (#4866)
* evolve fix * Enable login timeout * fix pkg * check rank * don't relogin
This commit is contained in:
1 parent
8ad9e4ed5b
commit
9febea79de
1 file changed
+3
-2
@@ -19,16 +19,17 @@ from utils.datasets import LoadImagesAndLabels
|
||||
from utils.datasets import img2label_paths
|
||||
from utils.general import check_dataset, check_file
|
||||
|
||||
RANK = int(os.getenv('RANK', -1))
|
||||
|
||||
try:
|
||||
import wandb
|
||||
|
||||
assert hasattr(wandb, '__version__') # verify package import not local dir
|
||||
if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2'):
|
||||
if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2') and RANK in [0, -1]:
|
||||
wandb.login(timeout=30)
|
||||
except (ImportError, AssertionError):
|
||||
wandb = None
|
||||
|
||||
RANK = int(os.getenv('RANK', -1))
|
||||
WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user