From 0082555cff36be590d9b56baa5afe700061734ba Mon Sep 17 00:00:00 2001 From: tfx-team Date: Tue, 13 Aug 2024 11:41:59 -0700 Subject: [PATCH] Add component type as a parameter pass to BCLExecutorOperator PiperOrigin-RevId: 662595884 --- tfx/orchestration/portable/launcher.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tfx/orchestration/portable/launcher.py b/tfx/orchestration/portable/launcher.py index e6de68315e..49ef5bdc1f 100644 --- a/tfx/orchestration/portable/launcher.py +++ b/tfx/orchestration/portable/launcher.py @@ -193,9 +193,15 @@ def __init__( self._driver_operators.update(custom_driver_operators or {}) self._executor_operator = None + # redundant line for external usage. + executor_operator = None if executor_spec: - self._executor_operator = self._executor_operators[type(executor_spec)]( - executor_spec, platform_config) + if executor_operator is None: + executor_operator = self._executor_operators[type(executor_spec)]( + executor_spec=executor_spec, platform_config=platform_config + ) + self._executor_operator = executor_operator + self._output_resolver = outputs_utils.OutputsResolver( pipeline_node=self._pipeline_node, pipeline_info=self._pipeline_info,