diff --git a/python/ray/autoscaler/autoscaler.py b/python/ray/autoscaler/autoscaler.py index a01b7e7a0..da0f4eab3 100644 --- a/python/ray/autoscaler/autoscaler.py +++ b/python/ray/autoscaler/autoscaler.py @@ -192,7 +192,7 @@ class LoadMetrics(object): resources_total[resource_id] = 0.0 resources_used[resource_id] += used resources_total[resource_id] += amount - assert used >= 0 + used = max(0, used) if amount > 0: frac = used / float(amount) if frac > max_frac: