From 9d0e1cf29832ab8e79a1c70bd93bf9b72d52831c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 1 Dec 2021 15:37:56 +0100 Subject: [PATCH] Update requirements.txt (#1869) * Update requirements.txt * Add wandb.errors.UsageError * bug fix --- requirements.txt | 2 +- utils/loggers/__init__.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 22b51fc490..e9843e1788 100755 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ tqdm>=4.41.0 # Logging ------------------------------------- tensorboard>=2.4.1 -# wandb +wandb # Plotting ------------------------------------ pandas>=1.1.4 diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index bf55fec860..a234ce2cf0 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -24,7 +24,10 @@ assert hasattr(wandb, '__version__') # verify package import not local dir if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2') and RANK in [0, -1]: - wandb_login_success = wandb.login(timeout=30) + try: + wandb_login_success = wandb.login(timeout=30) + except wandb.errors.UsageError: # known non-TTY terminal issue + wandb_login_success = False if not wandb_login_success: wandb = None except (ImportError, AssertionError):