pipelines/sdk/python
Connor McCarthy cf0e0cf87c
feat(sdk): enable dependency-free runtime install of kfp (#9886)
* handle problematic imports

* separate runtime and compile-time symbols

* wrap kfp/__init__.py imports unavailable at runtime

* update component factory + tests

* add runtime tests

* add --no-deps flag to component factory

* update release notes

* clean up

* handle containerized python components

* update golden snapshots

* update component_factory unit tests

* respond to review feedback

* fix runtime test and compilation logic

* update tests
2023-08-24 18:31:16 +00:00
..
kfp feat(sdk): enable dependency-free runtime install of kfp (#9886) 2023-08-24 18:31:16 +00:00
test_data feat(sdk): enable dependency-free runtime install of kfp (#9886) 2023-08-24 18:31:16 +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(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
install_from_source.sh chore(sdk): extract DSL into `kfp-dsl` package (#9738) 2023-07-25 23:34:02 +00:00
requirements-deprecated.txt chore(sdk): remove v1 dependencies from SDK v2 (#8668) 2023-01-19 12:53:27 -08:00
requirements-dev.txt chore(sdk): remove v1 dependencies from SDK v2 (#8668) 2023-01-19 12:53:27 -08:00
requirements.in chore(sdk): undo creation of kfp-dsl namespace package (#9874) 2023-08-15 16:24:52 -07:00
requirements.txt fix(sdk): fix click dependency bug (#9634) 2023-06-20 18:33:41 +00:00
setup.py chore(sdk): add kfp-kubernetes as kfp extras_require (#9152) 2023-04-17 10:08:22 -07: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
    })