Skip to content

Commit

Permalink
chore(sdk): Cherry pick #6844 and #6851 to sdk/release-1.8 branch (#6852
Browse files Browse the repository at this point in the history
)

* fix(sdk): fix cloud scheduler's job name (#6844)

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

* chore(sdk): Release 1.8.8 off `sdk/release-1.8` branch (#6853)

Co-authored-by: Trs <trsnium@gmail.com>
Co-authored-by: Yaqi Ji <jiyaqi0712@gmail.com>
  • Loading branch information
3 people committed Nov 3, 2021
1 parent 0c40154 commit 376191e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
31 changes: 31 additions & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,37 @@

## Documentation Updates

# 1.8.8

## Major Features and Improvements

* N/A

## Breaking Changes

* N/A

### For Pipeline Authors

* N/A

### For Component Authors

* N/A

## Deprecations

* N/A

## Bug Fixes and Other Changes

* Fix cloud scheduler's job name [\#6844](https://github.com/kubeflow/pipelines/pull/6844)
* Add deprecation warnings for v2 [\#6851](https://github.com/kubeflow/pipelines/pull/6851)

## Documentation Updates

* N/A

# 1.8.7

## Major Features and Improvements
Expand Down
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 @@ -1260,6 +1260,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
3 changes: 2 additions & 1 deletion sdk/python/kfp/v2/google/client/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def _create_from_pipeline_dict(
pipeline_jobs_api_url = f'https://{region}-{_CAIPP_ENDPOINT_WITHOUT_REGION}/{_CAIPP_API_VERSION}/projects/{project_id}/locations/{region}/pipelineJobs'

# Preparing the request body for the Cloud Function processing
full_pipeline_name = pipeline_dict.get('name')
pipeline_name = pipeline_dict['pipelineSpec']['pipelineInfo']['name']
full_pipeline_name = 'projects/{}/pipelineJobs/{}'.format(project_id, pipeline_name)
pipeline_display_name = pipeline_dict.get('displayName')
time_format_suffix = "-{{$.scheduledTime.strftime('%Y-%m-%d-%H-%M-%S')}}"
if 'name' in pipeline_dict:
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

0 comments on commit 376191e

Please sign in to comment.