pipelines/sdk/python
Connor McCarthy d8b9439ef9
add kfp v2 api reference docs (#8042)
* use __all__ in top-level modules to record public api

* add index and source files

* add kubeflow assets to _static/

* add and pin requirements

* use block quote instead of header for readme notice

* update conf.py

* delete old files
2022-07-19 15:53:54 -06:00
..
kfp add kfp v2 api reference docs (#8042) 2022-07-19 15:53:54 -06:00
tests chore(sdk): clean up kfp code style (#8027) 2022-07-15 00:06:34 +00:00
MANIFEST.in add registry json to package data (#7987) 2022-07-07 10:48:40 -06:00
README.md add kfp v2 api reference docs (#8042) 2022-07-19 15:53:54 -06:00
build.sh chore: update python version for build.sh (#5799) 2021-06-03 23:07:36 -07:00
requirements-dev.txt chore(sdk): update contributing guidelines/tests (#7802) 2022-07-12 20:35:29 -06:00
requirements.in feat(sdk): add retry policy support to kfp v2 (#7867) 2022-07-11 16:44:52 +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): clean up kfp code style (#8027) 2022-07-15 00:06:34 +00:00

README.md

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
    })