From 5541543d39eb87463053ba991dd23e177d015ff3 Mon Sep 17 00:00:00 2001 From: Yun Wu Date: Tue, 20 Feb 2024 12:04:56 -0800 Subject: [PATCH] Simplify zodiac team logic --- metaflow/plugins/aip/aip.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metaflow/plugins/aip/aip.py b/metaflow/plugins/aip/aip.py index 079cf3bd326..b9176b3e555 100644 --- a/metaflow/plugins/aip/aip.py +++ b/metaflow/plugins/aip/aip.py @@ -1062,8 +1062,9 @@ def _get_flow_labels( # the Zodiac service and team labels are added to the AIP pods and set. These labels are not added # by the AIP webhook to support user-supplied Zodiac service per AIP Notebook. Workflows launched # in project CICD profiles will still have these labels added via the AIP webhook. - if ZILLOW_ZODIAC_SERVICE and ZILLOW_ZODIAC_TEAM: + if ZILLOW_ZODIAC_SERVICE: ret_flow_labels[f"{zodiac_prefix}/service"] = ZILLOW_ZODIAC_SERVICE + if ZILLOW_ZODIAC_TEAM: ret_flow_labels[f"{zodiac_prefix}/team"] = ZILLOW_ZODIAC_TEAM ret_flow_labels[f"{zodiac_prefix}/product"] = "batch" @@ -1098,7 +1099,7 @@ def _set_container_labels(self, container_op: ContainerOp): "tags.ledger.zgtools.net/ai-experiment-name", self.experiment ) - if ZILLOW_ZODIAC_SERVICE and ZILLOW_ZODIAC_TEAM: + if ZILLOW_ZODIAC_SERVICE: # Add a logging topic annotation specific to the Zodiac service. # This is done to support user-supplied Zodiac service per AIP Notebook. # Please see comments on how and why ZILLOW_ZODIAC_SERVICE label for more.