From 455f7b8f76eb64655868d441f72ed02651031084 Mon Sep 17 00:00:00 2001 From: Willie Maddox Date: Tue, 25 Aug 2020 15:01:17 -0500 Subject: [PATCH] Update general.py (#823) Fixes #822 `init_seeds` from `torch_utils` import is being overwritten by function `init_seeds` in `general.py` --- utils/general.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/general.py b/utils/general.py index d4cd9a2..ec5717d 100755 --- a/utils/general.py +++ b/utils/general.py @@ -23,7 +23,8 @@ from scipy.cluster.vq import kmeans from scipy.signal import butter, filtfilt from tqdm import tqdm -from utils.torch_utils import init_seeds, is_parallel +from utils.torch_utils import init_seeds as init_torch_seeds +from utils.torch_utils import is_parallel # Set printoptions torch.set_printoptions(linewidth=320, precision=5, profile='long') @@ -55,7 +56,7 @@ def set_logging(rank=-1): def init_seeds(seed=0): random.seed(seed) np.random.seed(seed) - init_seeds(seed=seed) + init_torch_seeds(seed=seed) def get_latest_run(search_dir='./runs'):