pipelines/sdk/python
Mai Nakagawa ef94ccd734
fix(sdk): Resolves issue when using ParallelFor with param and depending tasks (#11903)
Signed-off-by: Mai Nakagawa <nakagawa.mai@gmail.com>
2025-05-09 15:49:41 +00:00
..
kfp fix(sdk): Resolves issue when using ParallelFor with param and depending tasks (#11903) 2025-05-09 15:49:41 +00:00
test_data fix(sdk): Add SDK support for setting resource limits on older KFP versions (#11839) 2025-04-21 13:46:27 +00:00
MANIFEST.in add registry json to package data (#7987) 2022-07-07 10:48:40 -06:00
README.md fix(sdk): fix kfp sdk v2 readme (#9668) 2023-06-21 00:15:40 +00:00
build.sh chore(sdk): undo creation of kfp-dsl namespace package (#9874) 2023-08-15 16:24:52 -07:00
requirements-deprecated.txt chore(sdk): remove v1 dependencies from SDK v2 (#8668) 2023-01-19 12:53:27 -08:00
requirements-dev.txt fix(sdk): fix pip install for dev (#11891) 2025-05-06 04:00:38 +00:00
requirements.in fix(deps): widen urllib3 upper bound to <3.0.0 (#11819) 2025-04-14 15:30:09 +00:00
requirements.txt fix(deps): widen urllib3 upper bound to <3.0.0 (#11819) 2025-04-14 15:30:09 +00:00
setup.py chore(sdk): support Python 3.13 (#11372) 2024-11-14 02:36:19 +00:00

README.md

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 kfp, run:

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