From b70dce0d022edeb0fdaeaf49e4b139aad400729b Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Wed, 19 Aug 2020 13:27:20 -0700 Subject: [PATCH] [autoscaler] Hotfix bad None check (#10196) --- python/ray/autoscaler/autoscaler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/autoscaler/autoscaler.py b/python/ray/autoscaler/autoscaler.py index 80ff355ec..4387cc3c0 100644 --- a/python/ray/autoscaler/autoscaler.py +++ b/python/ray/autoscaler/autoscaler.py @@ -262,7 +262,7 @@ class StandardAutoscaler: def _node_resources(self, node_id): instance_type = self.provider.node_tags(node_id).get( TAG_RAY_INSTANCE_TYPE) - if instance_type: + if self.instance_types and instance_type in self.instance_types: return self.instance_types[instance_type].get("resources", {}) else: return {}