Ayush Chaurasia commited on
Commit
302a1b0
1 Parent(s): 4fdaec0

W&B: Enable login timeout (#4843)

Browse files

* evolve fix

* Enable login timeout

* fix pkg

Files changed (2) hide show
  1. Dockerfile +1 -1
  2. utils/loggers/wandb/wandb_utils.py +3 -0
Dockerfile CHANGED
@@ -10,7 +10,7 @@ RUN apt update && apt install -y zip htop screen libgl1-mesa-glx
10
  COPY requirements.txt .
11
  RUN python -m pip install --upgrade pip
12
  RUN pip uninstall -y nvidia-tensorboard nvidia-tensorboard-plugin-dlprof
13
- RUN pip install --no-cache -r requirements.txt coremltools onnx gsutil notebook
14
  RUN pip install --no-cache -U torch torchvision numpy
15
  # RUN pip install --no-cache torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
16
 
 
10
  COPY requirements.txt .
11
  RUN python -m pip install --upgrade pip
12
  RUN pip uninstall -y nvidia-tensorboard nvidia-tensorboard-plugin-dlprof
13
+ RUN pip install --no-cache -r requirements.txt coremltools onnx gsutil notebook wandb>=0.12.2
14
  RUN pip install --no-cache -U torch torchvision numpy
15
  # RUN pip install --no-cache torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
16
 
utils/loggers/wandb/wandb_utils.py CHANGED
@@ -5,6 +5,7 @@ import os
5
  import sys
6
  from contextlib import contextmanager
7
  from pathlib import Path
 
8
 
9
  import yaml
10
  from tqdm import tqdm
@@ -20,6 +21,8 @@ try:
20
  import wandb
21
 
22
  assert hasattr(wandb, '__version__') # verify package import not local dir
 
 
23
  except (ImportError, AssertionError):
24
  wandb = None
25
 
 
5
  import sys
6
  from contextlib import contextmanager
7
  from pathlib import Path
8
+ import pkg_resources as pkg
9
 
10
  import yaml
11
  from tqdm import tqdm
 
21
  import wandb
22
 
23
  assert hasattr(wandb, '__version__') # verify package import not local dir
24
+ if pkg.parse_version(wandb.__version__) >= pkg.parse_version('0.12.2'):
25
+ wandb.login(timeout=30)
26
  except (ImportError, AssertionError):
27
  wandb = None
28