diff --git a/sdk/python/kfp/containers/_component_builder.py b/sdk/python/kfp/containers/_component_builder.py index a1239485f28..8330a78d2af 100644 --- a/sdk/python/kfp/containers/_component_builder.py +++ b/sdk/python/kfp/containers/_component_builder.py @@ -22,6 +22,9 @@ from collections import OrderedDict from pathlib import Path from typing import Callable + +from deprecated.sphinx import deprecated + from ..components._components import _create_task_factory_from_component_spec from ..components._python_op import _func_to_component_spec from ..components._yaml_utils import dump_yaml @@ -166,6 +169,7 @@ def _configure_logger(logger): logger.addHandler(error_handler) +@deprecated(version='0.1.32', reason='`build_python_component` is deprecated. Use `kfp.containers.build_image_from_working_dir` + `kfp.components.func_to_container_op` instead.') def build_python_component(component_func, target_image, base_image=None, dependency=[], staging_gcs_path=None, timeout=600, namespace=None, target_component_file=None, python_version='python3'): """ build_component automatically builds a container image for the component_func based on the base_image and pushes to the target_image.