pipelines/sdk/python
Chen Sun 8df22db757
chore(release): release sdk 2.0.0b6 (#8373)
* release sdk 2.0.0b6

* address review comments
2022-10-18 00:30:27 +00:00
..
kfp chore(release): release sdk 2.0.0b6 (#8373) 2022-10-18 00:30:27 +00:00
test_data feat(sdk): enable dynamic importer metadata (#7660) 2022-09-19 21:58:31 +00: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 Fix the example pipeline in sdk/python/README.md (#8206) 2022-08-30 14:55:45 -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): add script to check for unused imports (#8221) 2022-08-31 22:53:51 -07:00
requirements.in chore(sdk): Update upper bound for kubernetes dependency (#8173) 2022-08-31 22:47:54 +00:00
requirements.txt feat(sdk): add runtime logic for custom artifact types (support for custom artifact types pt. 3) (#8233) 2022-09-15 01:00:40 +00:00
setup.py fix(sdk): make sdk installable with poetry (#8263) 2022-09-14 21:08:08 +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: float = 1.0,
    b: float = 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
    })