From 06925b49398892645ed2f5b494c4c7fb35687f77 Mon Sep 17 00:00:00 2001 From: Sakari Ikonen <64256562+saikonen@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:45:52 +0300 Subject: [PATCH] use correct deco for limiting keys. (#1611) --- metaflow/plugins/aws/aws_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metaflow/plugins/aws/aws_utils.py b/metaflow/plugins/aws/aws_utils.py index 13612c3967..a7946cf750 100644 --- a/metaflow/plugins/aws/aws_utils.py +++ b/metaflow/plugins/aws/aws_utils.py @@ -97,7 +97,7 @@ def compute_resource_attributes(decos, compute_deco, resource_defaults): Returns a dictionary of resource attr -> value (str). """ assert compute_deco is not None - + supported_keys = set([*resource_defaults.keys(), *compute_deco.attributes.keys()]) # Use the value from resource_defaults by default (don't use None) result = {k: v for k, v in resource_defaults.items() if v is not None} @@ -111,7 +111,7 @@ def compute_resource_attributes(decos, compute_deco, resource_defaults): # the value zero. # # Skip attributes that are not supported by the decorator. - if k not in [*resource_defaults.keys(), *deco.attributes.keys()]: + if k not in supported_keys: continue if my_val is None and v is None: