From ebb6e552d207e201258b8d44155a72eb06679354 Mon Sep 17 00:00:00 2001 From: Jack Parker-Holder Date: Tue, 16 Feb 2021 00:04:10 +0000 Subject: [PATCH] [tune] PB2 - add small constant (#14118) --- python/ray/tune/schedulers/pb2_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/tune/schedulers/pb2_utils.py b/python/ray/tune/schedulers/pb2_utils.py index 881d5345f..37dc422e0 100644 --- a/python/ray/tune/schedulers/pb2_utils.py +++ b/python/ray/tune/schedulers/pb2_utils.py @@ -75,7 +75,7 @@ def normalize(data, wrt): which can be specified. """ return (data - np.min(wrt, axis=0)) / ( - np.max(wrt, axis=0) - np.min(wrt, axis=0)) + np.max(wrt, axis=0) - np.min(wrt, axis=0) + 1e-8) def standardize(data):