chore(sdk): Use pipeline_spec proto from kfp-pipeline-spec package (#4745)

* Use pipeline_spec proto from kfp-pipeline-spec package

* update imports

* use pre-released kfp-pipeline-spec (temporarily)

* Revert "use pre-released kfp-pipeline-spec (temporarily)"

This reverts commit 77f2e9a39c.

* test_requires

* version

* make kfp a namespace package

* move to the top

* version rc0
This commit is contained in:
Chen Sun 2020-11-10 16:14:41 -08:00 committed by GitHub
parent c9546970d5
commit 7cf620323f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 18 additions and 2986 deletions

View File

@ -12,7 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '1.1.0'
# `kfp` is a namespace package.
# https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
__version__ = '1.1.1rc0'
from . import components
from . import containers

View File

@ -28,7 +28,7 @@ from kfp.v2.compiler import compiler_utils
from kfp.v2.components import python_op
from kfp.v2.dsl import importer_node
from kfp.v2.dsl import type_utils
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
from google.protobuf import json_format

View File

@ -15,7 +15,7 @@
from typing import Any, List, Mapping, Optional, Union
from kfp.v2 import dsl
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
def build_runtime_parameter_spec(

View File

@ -16,7 +16,7 @@ import unittest
from kfp.v2 import dsl
from kfp.v2.compiler import compiler_utils
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
from google.protobuf import json_format

View File

@ -26,7 +26,7 @@ from kfp.v2.components.components import _resolve_command_line_and_paths
from kfp.v2.dsl import container_op
from kfp.v2.dsl import importer_node
from kfp.v2.dsl import type_utils
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
# TODO: cleanup unused code.

View File

@ -17,7 +17,7 @@ from typing import Callable, Text
from kfp import dsl
from kfp.v2.components import structures
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
# Unit constants for k8s size string.

View File

@ -15,7 +15,7 @@
import unittest
from kfp.v2.dsl import container_op
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
from google.protobuf import text_format
from google.protobuf import json_format

View File

@ -13,7 +13,7 @@
# limitations under the License.
"""Utility function for building Importer Node spec."""
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
OUTPUT_KEY = 'result'

View File

@ -14,7 +14,7 @@
import unittest
from kfp.v2.dsl import importer_node
from kfp.v2.proto import pipeline_spec_pb2 as pb
from kfp.pipeline_spec import pipeline_spec_pb2 as pb
from google.protobuf import json_format

View File

@ -16,7 +16,7 @@
import textwrap
from typing import List, Optional
from kfp.components import structures
from kfp.v2.proto import pipeline_spec_pb2
from kfp.pipeline_spec import pipeline_spec_pb2
# ComponentSpec I/O types to (IR) PipelineTaskSpec I/O types mapping.
# The keys are normalized (lowercased). These are types viewed as Artifacts.

View File

@ -16,7 +16,7 @@ import sys
import unittest
from kfp.components import structures
from kfp.v2.dsl import type_utils
from kfp.v2.proto import pipeline_spec_pb2 as pb
from kfp.pipeline_spec import pipeline_spec_pb2 as pb
_PARAMETER_TYPES = ['String', 'str', 'Integer', 'int', 'Float', 'Double']
_KNOWN_ARTIFACT_TYPES = ['Model', 'Dataset', 'Schema', 'Metrics']

View File

@ -1,2 +0,0 @@
The file `pipeline_spec_pb2.py` is protoc-generated from [`api/v2alpha1/pipeline_spec.proto`](https://github.com/kubeflow/pipelines/blob/master/api/v2alpha1/pipeline_spec.proto).
Please do not edit manually.

View File

@ -1,13 +0,0 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

File diff suppressed because one or more lines are too long

View File

@ -37,11 +37,13 @@ REQUIRES = [
'click',
'Deprecated',
'strip-hints',
'docstring-parser>=0.7.3'
'docstring-parser>=0.7.3',
'kfp-pipeline-spec',
]
TESTS_REQUIRE = [
'mock',
'kfp-pipeline-spec',
]
@ -83,7 +85,6 @@ setup(
'kfp.v2.compiler',
'kfp.v2.components',
'kfp.v2.dsl',
'kfp.v2.proto',
],
classifiers=[
'Intended Audience :: Developers',