komponents
Generates Kubeflow Components from Kubernetes CRD specifications.
Installation
pip install komponents
Usage
First, generate components. Components are specifications that Kubeflow uses to define steps of a pipeline. To generate a component, pipe a CRD specification to komponents generate, you must provide a success and failure condition. By default, component specification are written to the components directory.
kubectl get -o yaml crd/my-crd | komponents generate --success-condition status.state==SUCCESS --failure-condition status.state==FAILURE
Once you have generated your components you can plug them into a Kubeflow pipeline. Each field under spec of the crd becomes a parameter to the component function. Nested fields are differentiated with an underscore in the parameter name.
import kfp
crd_op = kfp.components.load_component('components/my-crd-group/my-crd-v1.yaml')
@kfp.dsl.pipeline()
def pipeline():
crd_op(foo='foo', bar='bar', baz_1='baz-1', baz_2='baz-2')
Development
python3 -m venv venv
source venv/bin/activate
pip install .
komponents --help
Release files for komponents 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| komponents-1.2.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| komponents-1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / komponents-1.2.tar.gz
| Download URL | komponents-1.2.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83f17451fdc3bdfb5fb2a0c7ee16c1495538cab2acc344ec1c0631ad915d94a5
|
|
BLAKE2b-256 checksum How to use checksums |
57b93914db1acdd34e539f5705c462bbbdeb01ce36fd2ed0b3aeb3c36da1ac33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / komponents-1.2-py3-none-any.whl
| Download URL | komponents-1.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77107bd2ff94be8fd421e72cb251e5d6d58fdca3e4991f7edbe08b2f6512ad77
|
|
BLAKE2b-256 checksum How to use checksums |
11c96098a9ac6b21793f7fdf71583acc4edfa9ed283db2f7f03da4df038faf89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|