[tune] Handle infinite and NaN values (#11835)

This commit is contained in:
Kai Fricke
2020-11-09 11:18:31 -08:00
committed by GitHub
parent 904f48ebd9
commit 88be1ea20b
9 changed files with 275 additions and 12 deletions
+4
View File
@@ -161,6 +161,10 @@ def date_str():
return datetime.today().strftime("%Y-%m-%d_%H-%M-%S")
def is_nan_or_inf(value):
return np.isnan(value) or np.isinf(value)
def env_integer(key, default):
# TODO(rliaw): move into ray.constants
if key in os.environ: