pipelines/sdk/python
Chen Sun 0ada48b55a
chore(sdk): move pipeline test samples closer to compiler unit tests. (#7849)
* chore(sdk): move pipeline test samples closer to compiler unit tests.

* explicitly list test files

* remove dead code
2022-06-08 18:35:17 +00:00
..
kfp chore(sdk): move pipeline test samples closer to compiler unit tests. (#7849) 2022-06-08 18:35:17 +00:00
tests chore(sdk): apply yapf formatting (#7414) 2022-03-16 20:34:36 +00:00
MANIFEST.in fix(sdk): include requirements.in in sdk manifest (#7429) 2022-03-16 15:55:14 -07:00
README.md add README with project description (#7782) 2022-05-26 14:59:12 -06:00
build.sh chore: update python version for build.sh (#5799) 2021-06-03 23:07:36 -07:00
requirements-dev.txt feat(sdk)!: make CLI output consistent, readable, and usable (#7739) 2022-05-20 00:03:23 +00:00
requirements-test.txt feat(sdk): add noun aliasing to cli (#7569) 2022-04-25 12:24:57 -06:00
requirements.in feat(sdk)!: make CLI output consistent, readable, and usable (#7739) 2022-05-20 00:03:23 +00:00
requirements.txt feat(sdk)!: make CLI output consistent, readable, and usable (#7739) 2022-05-20 00:03:23 +00:00
setup.py chore(sdk): use markdown for long description content type (#7825) 2022-06-02 23:37:25 +00:00

README.md

kfp: Kubeflow Pipelines SDK (pre-release)

Note: This is a pre-release and is not yet stable. Please report bugs and provide feedback via GitHub Issues.

Kubeflow Pipelines is a platform for building and deploying portable, scalable machine learning workflows based on Docker containers within the Kubeflow project.

Use Kubeflow Pipelines to compose a multi-step workflow (pipeline) as a graph of containerized tasks using Python code and/or YAML. Then, run your pipeline with specified pipeline arguments, rerun your pipeline with new arguments or data, schedule your pipeline to run on a recurring basis, organize your runs into experiments, save machine learning artifacts to compliant artifact registries, and visualize it all through the Kubeflow Dashboard.

Installation

To install the kfp pre-release, run:

pip install --pre kfp

Getting started

The following is an example of a simple pipeline that uses the kfp v2 syntax:

from kfp import dsl
import kfp


@dsl.component
def add(a: float, b: float) -> float:
    '''Calculates sum of two arguments'''
    return a + b


@dsl.pipeline(
    name='Addition pipeline',
    description='An example pipeline that performs addition calculations.')
def add_pipeline(
    a=1.0,
    b=7.0,
):
    first_add_task = add(a=a, b=4.0)
    second_add_task = add(a=first_add_task.output, b=b)


client = kfp.Client(host='<my-host-url>')
client.create_run_from_pipeline_func(
    add_pipeline, arguments={
        'a': 7.0,
        'b': 8.0
    })