Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk)!: Deprecate V2 compatible mode in v1 compiler #6958

Merged
merged 3 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions sdk/python/kfp/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
7 changes: 4 additions & 3 deletions sdk/python/tests/compiler/compiler_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def test_py_volume(self):
@parameterized.parameters(
{
'mode': 'V2_COMPATIBLE',
'is_v2': True
'error': True
},
{
'mode': 'V1',
Expand All @@ -451,7 +451,7 @@ def test_py_volume(self):
{
'mode': 'V2_COMPATIBLE',
'env': 'V1',
'is_v2': True
'error': True
},
{
'mode': None,
Expand All @@ -461,7 +461,7 @@ def test_py_volume(self):
{
'mode': None,
'env': 'V2_COMPATIBLE',
'is_v2': True
'error': True
},
{
'mode': None,
Expand Down Expand Up @@ -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')

Expand Down