From 6dc22a6d681afb7b3f51719cf9c8f3700483f528 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Mon, 24 Aug 2020 14:25:12 -0700 Subject: [PATCH] [autoscaler] Fix logging regression (#10280) --- python/ray/autoscaler/autoscaler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ray/autoscaler/autoscaler.py b/python/ray/autoscaler/autoscaler.py index 375f19b87..8adc40573 100644 --- a/python/ray/autoscaler/autoscaler.py +++ b/python/ray/autoscaler/autoscaler.py @@ -487,8 +487,9 @@ class StandardAutoscaler: resources: Either a list of resource bundles or a single resource demand dictionary. """ - logger.info( - "StandardAutoscaler: resource_requests={}".format(resources)) + if resources: + logger.info( + "StandardAutoscaler: resource_requests={}".format(resources)) if isinstance(resources, list): self.resource_demand_vector = resources else: