From 753d6903c060c806a9a3cf11d2aa51689b1cc9c5 Mon Sep 17 00:00:00 2001 From: Connor McCarthy Date: Fri, 5 Jan 2024 15:20:08 -0500 Subject: [PATCH] feat(sdk): remove local execution feature flag #localexecution (#10355) --- sdk/RELEASE.md | 1 + sdk/python/kfp/dsl/pipeline_task.py | 6 ------ sdk/python/kfp/local/__init__.py | 11 +++++------ sdk/python/kfp/local/testing_utilities.py | 4 ---- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md index bca5ffabd33a..c4f07e640061 100644 --- a/sdk/RELEASE.md +++ b/sdk/RELEASE.md @@ -2,6 +2,7 @@ ## Features * Add support for `dsl.PIPELINE_TASK_EXECUTOR_OUTPUT_PATH_PLACEHOLDER` and `dsl.PIPELINE_TASK_EXECUTOR_INPUT_PLACEHOLDER` [\#10240](https://github.com/kubeflow/pipelines/pull/10240) +* Add support for local component execution using `local.init()`, `DockerRunner`, and `SubprocessRunner` ## Breaking changes diff --git a/sdk/python/kfp/dsl/pipeline_task.py b/sdk/python/kfp/dsl/pipeline_task.py index 5e29b4fa6453..b3d168330ac0 100644 --- a/sdk/python/kfp/dsl/pipeline_task.py +++ b/sdk/python/kfp/dsl/pipeline_task.py @@ -30,8 +30,6 @@ from kfp.dsl.types import type_utils from kfp.pipeline_spec import pipeline_spec_pb2 -TEMPORARILY_BLOCK_LOCAL_EXECUTION = True - _register_task_handler = lambda task: utils.maybe_rename_for_k8s( task.component_spec.name) @@ -195,10 +193,6 @@ def _execute_locally(self, args: Dict[str, Any]) -> None: raise NotImplementedError( 'Local pipeline execution is not currently supported.') - # TODO: remove feature flag - if TEMPORARILY_BLOCK_LOCAL_EXECUTION: - return - self._outputs = task_dispatcher.run_single_component( pipeline_spec=self.component_spec.to_pipeline_spec(), arguments=args, diff --git a/sdk/python/kfp/local/__init__.py b/sdk/python/kfp/local/__init__.py index dc1e8acee996..5428cdca4de7 100755 --- a/sdk/python/kfp/local/__init__.py +++ b/sdk/python/kfp/local/__init__.py @@ -17,9 +17,8 @@ from kfp.local.config import init from kfp.local.config import SubprocessRunner -# TODO: uncomment when local execution is publicly available -# __all__ = [ -# 'init', -# 'SubprocessRunner', -# 'DockerRunner', -# ] +__all__ = [ + 'init', + 'SubprocessRunner', + 'DockerRunner', +] diff --git a/sdk/python/kfp/local/testing_utilities.py b/sdk/python/kfp/local/testing_utilities.py index e88b670f9503..7b4324ba7507 100755 --- a/sdk/python/kfp/local/testing_utilities.py +++ b/sdk/python/kfp/local/testing_utilities.py @@ -84,16 +84,12 @@ def tearDown(self): @classmethod def setUpClass(cls): # ENTER: use local KFP package path for subprocess runner - from kfp.dsl import pipeline_task - pipeline_task.TEMPORARILY_BLOCK_LOCAL_EXECUTION = False cls.original_component, dsl.component = dsl.component, functools.partial( dsl.component, kfp_package_path=_LOCAL_KFP_PACKAGE_PATH) @classmethod def tearDownClass(cls): # EXIT: use local KFP package path for subprocess runner - from kfp.dsl import pipeline_task - pipeline_task.TEMPORARILY_BLOCK_LOCAL_EXECUTION = True dsl.component = cls.original_component