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

chore(sdk): add deprecation warnings for v2 #6851

Merged
merged 1 commit into from
Nov 2, 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
6 changes: 6 additions & 0 deletions sdk/python/kfp/v2/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,12 @@ def compile(self,
pipeline_parameters: The mapping from parameter names to values. Optional.
type_check: Whether to enable the type check or not, default: True.
"""
warnings.warn(
'APIs imported from the v1 namespace (e.g. kfp.dsl, kfp.components, '
'etc) will not be supported by the v2 compiler since v2.0.0',
category=FutureWarning,
)

type_check_old_value = kfp.TYPE_CHECK
compiling_for_v2_old_value = kfp.COMPILING_FOR_V2
try:
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/kfp/v2/google/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def __init__(
region: GCP project region.
"""
warnings.warn(
'AIPlatformClient will be deprecated in v1.9. Please use PipelineJob'
'AIPlatformClient will be deprecated in v2.0.0. Please use PipelineJob'
' https://googleapis.dev/python/aiplatform/latest/_modules/google/cloud/aiplatform/pipeline_jobs.html'
' in Vertex SDK. Install the SDK using "pip install google-cloud-aiplatform"',
category=FutureWarning,
Expand Down
5 changes: 5 additions & 0 deletions sdk/python/kfp/v2/google/experimental/custom_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Module for supporting Google Cloud AI Platform Custom Job."""

import copy
import warnings
from typing import Any, List, Mapping, Optional

from kfp import dsl
Expand Down Expand Up @@ -73,6 +74,10 @@ def run_as_aiplatform_custom_job(
distributed training. For details, please see:
https://cloud.google.com/ai-platform-unified/docs/training/distributed-training
"""
warnings.warn(
'This function will be deprecated in v2.0.0', category=FutureWarning,
)

job_spec = {}

if worker_pool_specs is not None:
Expand Down