From ce70a519f90b444d6bdd24e26f4a8bc6ed20be37 Mon Sep 17 00:00:00 2001 From: Chen Sun Date: Wed, 24 Nov 2021 19:49:04 +0000 Subject: [PATCH 1/3] Deprecate V2 compatible mode in v1 compiler --- sdk/python/kfp/compiler/compiler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sdk/python/kfp/compiler/compiler.py b/sdk/python/kfp/compiler/compiler.py index e8abfc268ad..3aa8b34a60e 100644 --- a/sdk/python/kfp/compiler/compiler.py +++ b/sdk/python/kfp/compiler/compiler.py @@ -76,8 +76,10 @@ def __init__(self, raise ValueError('V2_ENGINE execution mode is not supported yet.') if mode == dsl.PipelineExecutionMode.V2_COMPATIBLE: - warnings.warn('V2_COMPATIBLE execution mode is at Beta quality.' - ' Some pipeline features may not work as expected.') + raise ValueError('V2_COMPATIBLE mode has been deprecated in KFP SDK' + ' 2.0. To use V2_COMPATIBLE mode, install KFP SDK' + ' 1.8.*.') + self._mode = mode self._launcher_image = launcher_image self._pipeline_name_param: Optional[dsl.PipelineParam] = None @@ -744,8 +746,7 @@ def _create_dag_templates(self, for op in pipeline.ops.values(): if hasattr(op, 'importer_spec'): raise ValueError( - 'dsl.importer is not supported with v1 compiler.' - ) + 'dsl.importer is not supported with v1 compiler.') if self._mode == dsl.PipelineExecutionMode.V2_COMPATIBLE: v2_compat.update_op( From 83a5012446574ebea820bc53c0dc2c6136fe9f6e Mon Sep 17 00:00:00 2001 From: Chen Sun Date: Wed, 24 Nov 2021 19:51:48 +0000 Subject: [PATCH 2/3] release note --- sdk/RELEASE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md index d51c80b8ed5..7c0e40ad5f1 100644 --- a/sdk/RELEASE.md +++ b/sdk/RELEASE.md @@ -13,6 +13,7 @@ * Remove sdk/python/kfp/v2/google directory for v2, including google client and custom job [\#6886](https://github.com/kubeflow/pipelines/pull/6886) * APIs imported from the v1 namespace are no longer supported by the v2 compiler. [\#6890](https://github.com/kubeflow/pipelines/pull/6890) +* Deprecate v2 compatible mode in v1 compiler. [\#6958](https://github.com/kubeflow/pipelines/pull/6958) ### For Pipeline Authors From 49622aa7c88bf136ade3deef82a8d081477786dd Mon Sep 17 00:00:00 2001 From: Chen Sun Date: Wed, 24 Nov 2021 20:03:34 +0000 Subject: [PATCH 3/3] fix tests --- sdk/python/tests/compiler/compiler_tests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/python/tests/compiler/compiler_tests.py b/sdk/python/tests/compiler/compiler_tests.py index 7c31d78db79..15d6945b4f3 100644 --- a/sdk/python/tests/compiler/compiler_tests.py +++ b/sdk/python/tests/compiler/compiler_tests.py @@ -434,7 +434,7 @@ def test_py_volume(self): @parameterized.parameters( { 'mode': 'V2_COMPATIBLE', - 'is_v2': True + 'error': True }, { 'mode': 'V1', @@ -451,7 +451,7 @@ def test_py_volume(self): { 'mode': 'V2_COMPATIBLE', 'env': 'V1', - 'is_v2': True + 'error': True }, { 'mode': None, @@ -461,7 +461,7 @@ def test_py_volume(self): { 'mode': None, 'env': 'V2_COMPATIBLE', - 'is_v2': True + 'error': True }, { 'mode': None, @@ -1466,6 +1466,7 @@ def test__resolve_task_pipeline_param(self): p, group_type="subgraph") self.assertEqual(resolved, "{{inputs.parameters.op1-param1}}") + @unittest.skip('v2 compatible mode is being deprecated in SDK v2.0') def test_uri_artifact_passing(self): self._test_py_compile_yaml('uri_artifacts', mode='V2_COMPATIBLE')