diff --git a/samples/core/loop_output/loop_output.py b/samples/core/loop_output/loop_output.py index b6e6da48637b..60148a991c2b 100644 --- a/samples/core/loop_output/loop_output.py +++ b/samples/core/loop_output/loop_output.py @@ -21,7 +21,7 @@ def args_generator_op() -> str: # TODO(Bobgy): how can we make this component with type float? -# got error: kfp.components.types.type_utils.InconsistentTypeException: +# got error: kfp.dsl.types.type_utils.InconsistentTypeException: # Incompatible argument passed to the input "s" of component "Print op": Argument # type "STRING" is incompatible with the input type "NUMBER_DOUBLE" @dsl.component diff --git a/sdk/python/kfp/deprecated/dsl/_component_bridge.py b/sdk/python/kfp/deprecated/dsl/_component_bridge.py index 47775efa21fd..0f10afecbd45 100644 --- a/sdk/python/kfp/deprecated/dsl/_component_bridge.py +++ b/sdk/python/kfp/deprecated/dsl/_component_bridge.py @@ -29,8 +29,8 @@ from kfp.deprecated.dsl import component_spec as dsl_component_spec from kfp.deprecated.dsl import dsl_utils from kfp.deprecated.dsl import types +from kfp.deprecated.dsl.types import type_utils from kfp.pipeline_spec import pipeline_spec_pb2 -from kfp.components.types import type_utils # Placeholder to represent the output directory hosting all the generated URIs. # Its actual value will be specified during pipeline compilation. diff --git a/sdk/python/kfp/deprecated/dsl/type_utils.py b/sdk/python/kfp/deprecated/dsl/type_utils.py index 0464733b636b..c0ed2238dfdc 100644 --- a/sdk/python/kfp/deprecated/dsl/type_utils.py +++ b/sdk/python/kfp/deprecated/dsl/type_utils.py @@ -11,23 +11,22 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Deprecated. See kfp.components.types.type_utils instead. +"""Deprecated. See kfp.dsl.types.type_utils instead. This module will be removed in KFP v2.0. """ import warnings -from kfp.components.types import type_utils +from kfp.dsl.types import type_utils, artifact_types from kfp.pipeline_spec import pipeline_spec_pb2 import inspect from typing import Union, Type import re from typing import List, Optional from kfp.deprecated.components import _structures -from kfp.components.types import artifact_types warnings.warn( 'Module kfp.dsl.type_utils is deprecated and will be removed' - ' in KFP v2.0. Please use from kfp.components.types.type_utils instead.', + ' in KFP v2.0. Please use from kfp.dsl.types.type_utils instead.', category=FutureWarning) is_parameter_type = type_utils.is_parameter_type diff --git a/sdk/python/kfp/deprecated/dsl/types.py b/sdk/python/kfp/deprecated/dsl/types.py index 2965a22c1d5f..8c793759aea9 100644 --- a/sdk/python/kfp/deprecated/dsl/types.py +++ b/sdk/python/kfp/deprecated/dsl/types.py @@ -19,7 +19,7 @@ from typing import Dict, Union import warnings -from kfp.components.types import type_utils +from kfp.deprecated.dsl import type_utils class BaseType: