Generates Kubeflow Components from Kubernetes CRD specifications
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file komponents-1.2.tar.gz
.
File metadata
- Download URL: komponents-1.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83f17451fdc3bdfb5fb2a0c7ee16c1495538cab2acc344ec1c0631ad915d94a5 |
|
MD5 | badb3ee19f9efe354d9d8c7f93aedf2f |
|
BLAKE2b-256 | 57b93914db1acdd34e539f5705c462bbbdeb01ce36fd2ed0b3aeb3c36da1ac33 |
File details
Details for the file komponents-1.2-py3-none-any.whl
.
File metadata
- Download URL: komponents-1.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77107bd2ff94be8fd421e72cb251e5d6d58fdca3e4991f7edbe08b2f6512ad77 |
|
MD5 | a45788d607c26d67f6b9f5bb44f3cb3b |
|
BLAKE2b-256 | 11c96098a9ac6b21793f7fdf71583acc4edfa9ed283db2f7f03da4df038faf89 |