From f6abca61f8106eb17cfb0697db8a33d80fe655f7 Mon Sep 17 00:00:00 2001 From: Ayush Chaurasia Date: Fri, 17 Sep 2021 22:29:34 +0530 Subject: [PATCH] W&B: Enable login timeout (#4843) * evolve fix * Enable login timeout * fix pkg --- Dockerfile | 2 +- utils/loggers/wandb/wandb_utils.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 858b22bc6383..e9cd304376ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN apt update && apt install -y zip htop screen libgl1-mesa-glx COPY requirements.txt . RUN python -m pip install --upgrade pip RUN pip uninstall -y nvidia-tensorboard nvidia-tensorboard-plugin-dlprof -RUN pip install --no-cache -r requirements.txt coremltools onnx gsutil notebook +RUN pip install --no-cache -r requirements.txt coremltools onnx gsutil notebook wandb>=0.12.2 RUN pip install --no-cache -U torch torchvision numpy # RUN pip install --no-cache torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html diff --git a/utils/loggers/wandb/wandb_utils.py b/utils/loggers/wandb/wandb_utils.py index 504a518f75ea..e7b0d82213f0 100644 --- a/utils/loggers/wandb/wandb_utils.py +++ b/utils/loggers/wandb/wandb_utils.py @@ -5,6 +5,7 @@ import sys from contextlib import contextmanager from pathlib import Path +import pkg_resources as pkg import yaml from tqdm import tqdm @@ -20,6 +21,8 @@ import wandb assert hasattr(wandb, '__version__') # verify package import not local dir + if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2'): + wandb.login(timeout=30) except (ImportError, AssertionError): wandb = None