From 9670811578f52eb79ce41708250176ccf047c883 Mon Sep 17 00:00:00 2001 From: Chen Sun Date: Mon, 28 Oct 2024 17:45:51 -0700 Subject: [PATCH] feat(components)!: Deprecate preview.custom_job module Signed-off-by: Chen Sun PiperOrigin-RevId: 690809087 --- components/google-cloud/RELEASE.md | 1 + .../preview/custom_job/__init__.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/components/google-cloud/RELEASE.md b/components/google-cloud/RELEASE.md index 3e1c72cb3e16..3cc17345d65e 100644 --- a/components/google-cloud/RELEASE.md +++ b/components/google-cloud/RELEASE.md @@ -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` module. ## Release 2.17.0 * Fix Gemini batch prediction support to `v1.model_evaluation.autosxs_pipeline` after output schema change. diff --git a/components/google-cloud/google_cloud_pipeline_components/preview/custom_job/__init__.py b/components/google-cloud/google_cloud_pipeline_components/preview/custom_job/__init__.py index ac8c9aeb7825..83e29bf53af1 100644 --- a/components/google-cloud/google_cloud_pipeline_components/preview/custom_job/__init__.py +++ b/components/google-cloud/google_cloud_pipeline_components/preview/custom_job/__init__.py @@ -17,6 +17,15 @@ customized worker and cloud configurations. """ # fmt: on +import warnings + +warnings.warn( + ( + '`preview.custom_job` is deprecated and will be removed in a future ' + 'version. Please use `v1.custom_job` instead.' + ), + category=DeprecationWarning, +) from google_cloud_pipeline_components.preview.custom_job.component import custom_training_job as CustomTrainingJobOp from google_cloud_pipeline_components.preview.custom_job.utils import create_custom_training_job_from_component