Kubeflow pipelines docs mentions that there is a way to add metadata annotations as a key-value pairs. From the other hand, I could not find any relevant documentation of how it can be done.
Is there an option to add some metadata to any kfp component? If yes, can it be done using a python function component? I'd like to add some metadata and annotations a component that will get compiled into the resulting pipeline.
I've seen that:
- in the past, one could use
add_pod_annotation
which is now deprecated and any way it was translated to Kubernetes pod annotations - We can add annotations to
Artifacts
But both not relevant to my use case.
Ideally, I'd expect something like that:
@dsl.component(
packages_to_install=['pandas==1.3.5'],
metadata={"k1": "v1", "k2":"v2"}
)
def say_hello(name: str) -> str:
hello_text = f'Hello, {name}!'
return hello_text
Which will get compiled into some pipeline yaml, where this component has another metadata
section with {"k1": "v1", "k2":"v2"}.