Skip to content

Commit

Permalink
feat(components)!: Deprecate preview.custom_job
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Sun <[email protected]>
PiperOrigin-RevId: 690775448
  • Loading branch information
chensun authored and Google Cloud Pipeline Components maintainers committed Oct 29, 2024
1 parent c84241b commit 17761d6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/google-cloud/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Upcoming release
* Remove default prediction column names in `v1.model_evaluation.regression_component` component to fix pipeline errors when using bigquery data source.
* Add reservation_affinition support in `v1.create_custom_training_job_from_component`.
* Deprecate `preview.custom_job.create_custom_training_job_from_component` and `preview.custom_job.CustomTrainingJobOP`.

## Release 2.17.0
* Fix Gemini batch prediction support to `v1.model_evaluation.autosxs_pipeline` after output schema change.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from typing import Dict, List
import warnings

from google_cloud_pipeline_components import _image
from google_cloud_pipeline_components import _placeholders
Expand Down Expand Up @@ -63,6 +64,14 @@ def custom_training_job(
gcp_resources: Serialized JSON of `gcp_resources` [proto](https://github.com/kubeflow/pipelines/tree/master/components/google-cloud/google_cloud_pipeline_components/proto) which tracks the CustomJob.
"""
# fmt: on

warnings.warn(
"'preview.custom_job.CustomTrainingJobOp' is"
' deprecated and will be removed in a future release. Please use'
" 'v1.custom_job.CustomTrainingJobOp' instead.",
DeprecationWarning,
)

return dsl.ContainerSpec(
image=_image.GCPC_IMAGE_TAG,
command=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ def create_custom_training_job_from_component(
# After adding the appropriate description and the name, the new component
# is returned.

warnings.warn(
"'preview.custom_job.create_custom_training_job_from_component' is"
' deprecated and will be removed in a future release. Please use'
" 'v1.custom_job.create_custom_training_job_from_component' instead.",
category=DeprecationWarning,
stacklevel=2,
)

cj_pipeline_spec = json_format.MessageToDict(
component.custom_training_job.pipeline_spec
)
Expand Down

0 comments on commit 17761d6

Please sign in to comment.