diff --git a/python/ray/experimental/state.py b/python/ray/experimental/state.py index 9b02f1cf9..2e43af8ce 100644 --- a/python/ray/experimental/state.py +++ b/python/ray/experimental/state.py @@ -775,7 +775,7 @@ class GlobalState(object): num_tasks += self.redis_client.zcount( event_log_set, min=0, max=time.time()) - if num_tasks is 0: + if num_tasks == 0: return 0, 0, 0 return overall_smallest, overall_largest, num_tasks diff --git a/python/ray/experimental/ui.py b/python/ray/experimental/ui.py index 15a6fd05f..967336953 100644 --- a/python/ray/experimental/ui.py +++ b/python/ray/experimental/ui.py @@ -97,7 +97,7 @@ def get_sliders(update): with out_recursion: smallest, largest, num_tasks = ray.global_state._job_length() diff = largest - smallest - if num_tasks is not 0: + if num_tasks != 0: # Describes the initial values that the slider/text box # values should be set to.