mirror of
https://github.com/wassname/ray.git
synced 2026-08-06 13:31:10 +08:00
[tune] Handle infinite and NaN values (#11835)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user