Comments (2)
In KFP V1, a component is only mapped to a containerOp. KFP V2 introduced graph components where you can load a compiled V2 IR into a KFP component.
This is the same behavior with KFP Argo v1 as well, as you will see the similar errors with the original KFP V1 code
import kfp
from kfp import dsl
def say_hello(name: str) -> str:
hello_text = f'Hello, {name}!'
print(hello_text)
return hello_text
say_hello = kfp.components.create_component_from_func(say_hello)
@dsl.pipeline(name="name", description="description")
def hello_pipeline(recipient: str) -> str:
hello_task = say_hello(recipient)
return hello_task.output
if __name__=="__main__":
kfp.compiler.Compiler().compile(pipeline_func=hello_pipeline, package_path="./test.yaml")
pipe = kfp.components.load_component_from_file("./test.yaml")
Errors with Argo yaml:
TypeError: Error: MetadataSpec.from_dict(struct=OrderedDict([('generateName', 'name-'), ('annotations', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22'), ('pipelines.kubeflow.org/pipeline_compilation_time', '2023-09-12T09:51:53.515450'), ('pipelines.kubeflow.org/pipeline_spec', '{"description": "description", "inputs": [{"name": "recipient", "type": "String"}], "name": "name", "outputs": [{"name": "Output", "type": "String"}]}')])), ('labels', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22')]))])) failed with exception:
__init__() got an unexpected keyword argument 'generateName'
Error: Structure "OrderedDict([('generateName', 'name-'), ('annotations', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22'), ('pipelines.kubeflow.org/pipeline_compilation_time', '2023-09-12T09:51:53.515450'), ('pipelines.kubeflow.org/pipeline_spec', '{"description": "description", "inputs": [{"name": "recipient", "type": "String"}], "name": "name", "outputs": [{"name": "Output", "type": "String"}]}')])), ('labels', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22')]))])" is not None.
Error: Structure "OrderedDict([('generateName', 'name-'), ('annotations', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22'), ('pipelines.kubeflow.org/pipeline_compilation_time', '2023-09-12T09:51:53.515450'), ('pipelines.kubeflow.org/pipeline_spec', '{"description": "description", "inputs": [{"name": "recipient", "type": "String"}], "name": "name", "outputs": [{"name": "Output", "type": "String"}]}')])), ('labels', OrderedDict([('pipelines.kubeflow.org/kfp_sdk_version', '1.8.22')]))])" is incompatible with type "typing.Optional[kfp.components._structures.MetadataSpec]" - none of the types in Union are compatible.
from kfp-tekton.
Components like KServe are just a simple containerOp which you can load it with KFP V1 kfp.components.load_component_from_file
https://github.com/kubeflow/pipelines/blob/master/components/kserve/component.yaml
from kfp-tekton.
Related Issues (20)
- Set DEFAULT_STORAGE_CLASS is not taking any side effect HOT 7
- Why kfp-tekton-server-api is required? HOT 2
- Recurring runs do not inherit Pipeline Run names and substitutions
- Support runtime configuration in v2 HOT 1
- Task result not passed to nested loop HOT 1
- Performance enhancement: Update pipelineloop to use informer instead of lister for updating pipeline status. HOT 2
- Parameterize the v2 Launcher Image HOT 1
- [KFP-Tekton v2] Merge driver, ktp-task, and taskrun logic into a single custom task controller HOT 2
- Moving KFP-Tekton V2 custom task controller to master branch and use go mod import HOT 1
- Update fluentd example to support new KFP V2 log archive HOT 2
- KFP-Tekton V2 tracker issue
- Update kubectl-wrapper code into a kfp component so user can replicate resource op in kfp v2. HOT 2
- Improve Logging in the KFP components HOT 1
- Tekton V2 compiler: gather user data on how the exit handler should represent HOT 4
- Support artifact passing in airgapped environments with self-signed certs
- Implement removal of SCCs
- Update/Remove hardcoded minio-service annotation
- [KFP-Tekton v2] Merge DAG drivers and publishers into a sub-dag controller to reduce Tekton graph complexity.
- fix datetime usage in python sdk _client.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kfp-tekton.